Skip to content

Commit 344e278

Browse files
LiviaMedeirosaduh95
authored andcommitted
test_runner: use kEmptyObject
PR-URL: nodejs/node#43159 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 01409dd commit 344e278

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/internal/test_runner/test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// https://github.com/nodejs/node/blob/1aab13cad9c800f4121c1d35b554b78c1b17bdbd/lib/internal/test_runner/test.js
1+
// https://github.com/nodejs/node/blob/44aa46d70537d3807bd9255db77f76cd9dea5267/lib/internal/test_runner/test.js
22

33
'use strict'
44

@@ -7,7 +7,6 @@ const {
77
ArrayPrototypeShift,
88
FunctionPrototype,
99
Number,
10-
ObjectCreate,
1110
SafeMap
1211
} = require('#internal/per_context/primordials')
1312
const { AsyncResource } = require('async_hooks')
@@ -19,7 +18,10 @@ const {
1918
} = require('#internal/errors')
2019
const { getOptionValue } = require('#internal/options')
2120
const { TapStream } = require('#internal/test_runner/tap_stream')
22-
const { createDeferredPromise } = require('#internal/util')
21+
const {
22+
createDeferredPromise,
23+
kEmptyObject
24+
} = require('#internal/util')
2325
const { isPromise } = require('#internal/util/types')
2426
const { isUint32 } = require('#internal/validators')
2527
const { cpus } = require('os')
@@ -203,7 +205,7 @@ class Test extends AsyncResource {
203205
}
204206

205207
if (options === null || typeof options !== 'object') {
206-
options = ObjectCreate(null)
208+
options = kEmptyObject
207209
}
208210

209211
let parent = this

0 commit comments

Comments
 (0)