Skip to content

Commit

Permalink
[Performance] avoid the extra call frame to new it
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 12, 2024
1 parent 201e650 commit 78fd0d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -3,7 +3,7 @@
var defined = require('defined');
var createDefaultStream = require('./lib/default_stream');
var Test = require('./lib/test');
var createResult = require('./lib/results');
var Results = require('./lib/results');
var through = require('@ljharb/through');

var canEmitExit = typeof process !== 'undefined' && process
Expand Down Expand Up @@ -67,7 +67,7 @@ module.exports = (function () {
}());

function createHarness(conf_) {
var results = createResult();
var results = new Results();
if (!conf_ || conf_.autoclose !== false) {
results.once('done', function () { results.close(); });
}
Expand Down

0 comments on commit 78fd0d6

Please sign in to comment.