Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
rluvaton committed Jul 18, 2023
1 parent 0ed4cb4 commit c4710a8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/parallel/test-runner-run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,39 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
stream.on('test:fail', common.mustNotCall());
stream.on('test:pass', common.mustNotCall());
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
});

it('should fail with non existing file', async () => {
const stream = run({ files: ['a-random-file-that-does-not-exist.js'] });
stream.on('test:fail', common.mustCall(1));
stream.on('test:pass', common.mustNotCall());
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
});

it('should succeed with a file', async () => {
const stream = run({ files: [join(testFixtures, 'test/random.cjs')] });
stream.on('test:fail', common.mustNotCall());
stream.on('test:pass', common.mustCall(1));
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
});

it('should run same file twice', async () => {
const stream = run({ files: [join(testFixtures, 'test/random.cjs'), join(testFixtures, 'test/random.cjs')] });
stream.on('test:fail', common.mustNotCall());
stream.on('test:pass', common.mustCall(2));
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
});

it('should run a failed test', async () => {
const stream = run({ files: [testFixtures] });
stream.on('test:fail', common.mustCall(1));
stream.on('test:pass', common.mustNotCall());
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
});

it('should support timeout', async () => {
Expand All @@ -59,7 +59,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
stream.on('test:fail', common.mustCall(2));
stream.on('test:pass', common.mustNotCall());
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
});

it('should validate files', async () => {
Expand Down Expand Up @@ -320,7 +320,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
executedTestFiles.push(passedTest.file);
});
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);

assert.deepStrictEqual(executedTestFiles, [
join(shardsTestsFixtures, 'a.cjs'),
Expand Down Expand Up @@ -350,7 +350,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {

await Promise.all(testStreams.map(async (stream) => {
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
}));

assert.deepStrictEqual(executedTestFiles, [...new Set(executedTestFiles)]);
Expand Down Expand Up @@ -378,7 +378,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {

await Promise.all(testStreams.map(async (stream) => {
// eslint-disable-next-line no-unused-vars
for await (const _ of stream) ;
for await (const _ of stream);
}));

assert.deepStrictEqual(executedTestFiles.sort(), [...shardsTestsFiles].sort());
Expand Down

0 comments on commit c4710a8

Please sign in to comment.