Skip to content

Commit

Permalink
test: remove unnecessary whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarchini committed Aug 26, 2024
1 parent 32150f6 commit 4310da8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
34 changes: 17 additions & 17 deletions test/parallel/test-runner-run-watch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async function testWatch({ fileToUpdate, file, action = 'update', cwd = tmpdir.p
child.stdout.on('data', (data) => {
stdout += data.toString();
currentRun += data.toString();
const testRuns = stdout.match(/ duration_ms\s\d+/g);
const testRuns = stdout.match(/duration_ms\s\d+/g);
if (testRuns?.length >= 1) ran1.resolve();
if (testRuns?.length >= 2) ran2.resolve();
});
Expand All @@ -78,10 +78,10 @@ async function testWatch({ fileToUpdate, file, action = 'update', cwd = tmpdir.p

for (const run of runs) {
assert.doesNotMatch(run, /run\(\) is being called recursively/);
assert.match(run, / tests 1/);
assert.match(run, / pass 1/);
assert.match(run, / fail 0/);
assert.match(run, / cancelled 0/);
assert.match(run, /tests 1/);
assert.match(run, /pass 1/);
assert.match(run, /fail 0/);
assert.match(run, /cancelled 0/);
}
};

Expand All @@ -101,21 +101,21 @@ async function testWatch({ fileToUpdate, file, action = 'update', cwd = tmpdir.p
assert.strictEqual(runs.length, 2);

const [firstRun, secondRun] = runs;
assert.match(firstRun, / tests 1/);
assert.match(firstRun, / pass 1/);
assert.match(firstRun, / fail 0/);
assert.match(firstRun, / cancelled 0/);
assert.match(firstRun, /tests 1/);
assert.match(firstRun, /pass 1/);
assert.match(firstRun, /fail 0/);
assert.match(firstRun, /cancelled 0/);
assert.doesNotMatch(firstRun, /run\(\) is being called recursively/);

if (action === 'rename2') {
assert.match(secondRun, /MODULE_NOT_FOUND/);
return;
}

assert.match(secondRun, / tests 1/);
assert.match(secondRun, / pass 1/);
assert.match(secondRun, / fail 0/);
assert.match(secondRun, / cancelled 0/);
assert.match(secondRun, /tests 1/);
assert.match(secondRun, /pass 1/);
assert.match(secondRun, /fail 0/);
assert.match(secondRun, /cancelled 0/);
assert.doesNotMatch(secondRun, /run\(\) is being called recursively/);
};

Expand Down Expand Up @@ -163,10 +163,10 @@ async function testWatch({ fileToUpdate, file, action = 'update', cwd = tmpdir.p
await once(child, 'exit');

for (const run of runs) {
assert.match(run, / tests 1/);
assert.match(run, / pass 1/);
assert.match(run, / fail 0/);
assert.match(run, / cancelled 0/);
assert.match(run, /tests 1/);
assert.match(run, /pass 1/);
assert.match(run, /fail 0/);
assert.match(run, /cancelled 0/);
}
};

Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-runner-watch-mode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ async function testWatch({
await once(child, 'exit');

for (const run of runs) {
assert.match(run, / tests 1/);
assert.match(run, / pass 1/);
assert.match(run, / fail 0/);
assert.match(run, / cancelled 0/);
assert.match(run, /tests 1/);
assert.match(run, /pass 1/);
assert.match(run, /fail 0/);
assert.match(run, /cancelled 0/);
}
};

Expand Down

0 comments on commit 4310da8

Please sign in to comment.