Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: do not use test patterns in sharding tests #48768

Closed
wants to merge 4 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions test/parallel/test-runner-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,22 @@ const testFixtures = fixtures.path('test-runner');

{
// --test-shard option, first shard
const allShardsTestsFiles = [
'a.cjs',
'b.cjs',
'c.cjs',
'd.cjs',
'e.cjs',
'f.cjs',
'g.cjs',
'h.cjs',
'i.cjs',
'j.cjs',
].map((file) => join(testFixtures, 'shards', file));
rluvaton marked this conversation as resolved.
Show resolved Hide resolved
const args = [
'--test',
'--test-shard=1/2',
join(testFixtures, 'shards/*.cjs'),
...allShardsTestsFiles,
atlowChemi marked this conversation as resolved.
Show resolved Hide resolved
];
const child = spawnSync(process.execPath, args);

Expand Down Expand Up @@ -303,10 +315,22 @@ const testFixtures = fixtures.path('test-runner');

{
// --test-shard option, last shard
const allShardsTestsFiles = [
'a.cjs',
'b.cjs',
'c.cjs',
'd.cjs',
'e.cjs',
'f.cjs',
'g.cjs',
'h.cjs',
'i.cjs',
'j.cjs',
].map((file) => join(testFixtures, 'shards', file));
const args = [
'--test',
'--test-shard=2/2',
join(testFixtures, 'shards/*.cjs'),
...allShardsTestsFiles,
];
const child = spawnSync(process.execPath, args);

Expand Down