Skip to content

Commit

Permalink
test_runner: remove plan option from run()
Browse files Browse the repository at this point in the history
This commit removes the plan option to run(). I believe it was
added by mistake. It is not documented, untested, and a test
plan does not make sense in the context of run().

This commit also fixes a minor formatting issue in a related
fixture.

Refs: #52860
PR-URL: #53834
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
cjihrig authored and aduh95 committed Jul 16, 2024
1 parent a020f3f commit dcac3d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/internal/test_runner/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ function run(options = kEmptyObject) {
watch,
setup,
only,
plan,
} = options;

if (files != null) {
Expand Down Expand Up @@ -552,7 +551,7 @@ function run(options = kEmptyObject) {
});
}

const root = createTestTree({ __proto__: null, concurrency, timeout, signal, plan });
const root = createTestTree({ __proto__: null, concurrency, timeout, signal });
root.harness.shouldColorizeTestFiles ||= shouldColorizeTestFiles(root);

if (process.env.NODE_TEST_CONTEXT !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/test-runner/output/test-runner-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ test('planning with streams', (t, done) => {
});

stream.on('end', () => {
done();
done();
});
})

0 comments on commit dcac3d9

Please sign in to comment.