Skip to content

Commit 6597499

Browse files
remove over-complication to runTest signature
1 parent db192c3 commit 6597499

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/internal/test_runner/test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,11 @@ class TestContext {
359359
this.#test.todo(message);
360360
}
361361

362-
#runTest(name, options, fn, extraOverrides) {
363-
const overrides = ObjectAssign({
362+
#runTest(name, options, fn) {
363+
const overrides = {
364364
__proto__: null,
365365
loc: getCallerLocation(),
366-
}, extraOverrides);
366+
};
367367

368368
const { plan } = this.#test;
369369
if (plan !== null) {
@@ -380,10 +380,10 @@ class TestContext {
380380

381381
test = ObjectAssign((...args) => this.#runTest(...args), {
382382
__proto__: null,
383-
expectFailure: (name, opts, fn) => this.#runTest(name, opts, fn, { __proto__: null, expectFailure: true }),
384-
only: (name, opts, fn) => this.#runTest(name, opts, fn, { __proto__: null, only: true }),
385-
skip: (name, opts, fn) => this.#runTest(name, opts, fn, { __proto__: null, skip: true }),
386-
todo: (name, opts, fn) => this.#runTest(name, opts, fn, { __proto__: null, todo: true }),
383+
expectFailure: (name, opts, fn) => this.#runTest(name, { __proto__: null, ...opts, expectFailure: true }, fn),
384+
only: (name, opts, fn) => this.#runTest(name, { __proto__: null, ...opts, only: true }, fn),
385+
skip: (name, opts, fn) => this.#runTest(name, { __proto__: null, ...opts, skip: true }, fn),
386+
todo: (name, opts, fn) => this.#runTest(name, { __proto__: null, ...opts, todo: true }, fn),
387387
});
388388

389389
before(fn, options) {

0 commit comments

Comments
 (0)