Skip to content

Commit 27841be

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

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/internal/test_runner/test.js

Lines changed: 5 additions & 3 deletions
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');
@@ -202,7 +204,7 @@ class Test extends AsyncResource {
202204
}
203205

204206
if (options === null || typeof options !== 'object') {
205-
options = ObjectCreate(null);
207+
options = kEmptyObject;
206208
}
207209

208210
let parent = this;

0 commit comments

Comments
 (0)