From 78fd0d61809bc922e7ac85d65902cc1de1124936 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 12 Jan 2024 14:56:19 -0800 Subject: [PATCH] [Performance] avoid the extra call frame to `new` it --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7a7211e8..5da6eb42 100644 --- a/index.js +++ b/index.js @@ -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 @@ -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(); }); }