Skip to content

Commit

Permalink
test_runner: use kEmptyObject
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#43159
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
LiviaMedeiros authored and aduh95 committed Jul 8, 2022
1 parent 01409dd commit 344e278
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/internal/test_runner/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://github.com/nodejs/node/blob/1aab13cad9c800f4121c1d35b554b78c1b17bdbd/lib/internal/test_runner/test.js
// https://github.com/nodejs/node/blob/44aa46d70537d3807bd9255db77f76cd9dea5267/lib/internal/test_runner/test.js

'use strict'

Expand All @@ -7,7 +7,6 @@ const {
ArrayPrototypeShift,
FunctionPrototype,
Number,
ObjectCreate,
SafeMap
} = require('#internal/per_context/primordials')
const { AsyncResource } = require('async_hooks')
Expand All @@ -19,7 +18,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')
Expand Down Expand Up @@ -203,7 +205,7 @@ class Test extends AsyncResource {
}

if (options === null || typeof options !== 'object') {
options = ObjectCreate(null)
options = kEmptyObject
}

let parent = this
Expand Down

0 comments on commit 344e278

Please sign in to comment.