From 27841bee3debf78190866cbf9749e2f37c311aeb Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Sat, 21 May 2022 17:56:01 +0800 Subject: [PATCH] test_runner: use `kEmptyObject` PR-URL: https://github.com/nodejs/node/pull/43159 Reviewed-By: Matteo Collina Reviewed-By: Antoine du Hamel --- lib/internal/test_runner/test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index 6788f9ea281b75..2876b3d66640cd 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -4,7 +4,6 @@ const { ArrayPrototypeShift, FunctionPrototype, Number, - ObjectCreate, SafeMap, } = primordials; const { AsyncResource } = require('async_hooks'); @@ -16,7 +15,10 @@ const { } = require('internal/errors'); const { getOptionValue } = require('internal/options'); const { TapStream } = require('internal/test_runner/tap_stream'); -const { createDeferredPromise } = require('internal/util'); +const { + createDeferredPromise, + kEmptyObject, +} = require('internal/util'); const { isPromise } = require('internal/util/types'); const { isUint32 } = require('internal/validators'); const { cpus } = require('os'); @@ -202,7 +204,7 @@ class Test extends AsyncResource { } if (options === null || typeof options !== 'object') { - options = ObjectCreate(null); + options = kEmptyObject; } let parent = this;