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 guangwong committed Oct 10, 2022
1 parent 4510cf8 commit f07d01c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/internal/test_runner/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const {
ArrayPrototypeShift,
FunctionPrototype,
Number,
ObjectCreate,
SafeMap,
} = primordials;
const { AsyncResource } = require('async_hooks');
Expand All @@ -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');
Expand Down Expand Up @@ -202,7 +204,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 f07d01c

Please sign in to comment.