test_runner: use `kEmptyObject`

PR-URL: https://github.com/nodejs/node/pull/43159
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
pull/43159/head
LiviaMedeiros 2022-05-21 17:56:01 +08:00 committed by Antoine du Hamel
parent a0178a1169
commit 44aa46d705
No known key found for this signature in database
GPG Key ID: 21D900FFDB233756
1 changed files with 5 additions and 3 deletions

View File

@ -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');
@ -198,7 +200,7 @@ class Test extends AsyncResource {
}
if (options === null || typeof options !== 'object') {
options = ObjectCreate(null);
options = kEmptyObject;
}
let parent = this;