Skip to content

Commit e576a7f

Browse files
LiviaMedeirosdanielleadams
authored andcommitted
test_runner: use kEmptyObject
PR-URL: #43159 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent b200a5f commit e576a7f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/internal/test_runner/test.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const {
44
ArrayPrototypeShift,
55
FunctionPrototype,
66
Number,
7-
ObjectCreate,
87
SafeMap,
98
} = primordials;
109
const { AsyncResource } = require('async_hooks');
@@ -16,7 +15,10 @@ const {
1615
} = require('internal/errors');
1716
const { getOptionValue } = require('internal/options');
1817
const { TapStream } = require('internal/test_runner/tap_stream');
19-
const { createDeferredPromise } = require('internal/util');
18+
const {
19+
createDeferredPromise,
20+
kEmptyObject,
21+
} = require('internal/util');
2022
const { isPromise } = require('internal/util/types');
2123
const { isUint32 } = require('internal/validators');
2224
const { cpus } = require('os');
@@ -198,7 +200,7 @@ class Test extends AsyncResource {
198200
}
199201

200202
if (options === null || typeof options !== 'object') {
201-
options = ObjectCreate(null);
203+
options = kEmptyObject;
202204
}
203205

204206
let parent = this;

0 commit comments

Comments
 (0)