Skip to content

Commit

Permalink
test: reorder test files fixtures for better understanding
Browse files Browse the repository at this point in the history
  • Loading branch information
rluvaton committed Aug 14, 2023
1 parent cb816ec commit 8b98c18
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/parallel/test-runner-run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,13 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
});

describe('AbortSignal', () => {
it('should stop watch mode when abortSignal aborts', async () => {
const controller = new AbortController();
const result = await run({ files: [join(testFixtures, 'default-behavior/test/random.cjs')], watch: true, signal: controller.signal })
it('should stop watch mode when abortSignal aborts', async () => {
const controller = new AbortController();
const result = await run({
files: [join(testFixtures, 'default-behavior/test/random.cjs')],
watch: true,
signal: controller.signal
})
.compose(async function* (source) {
for await (const chunk of source) {
if (chunk.type === 'test:pass') {
Expand All @@ -161,8 +165,8 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
}
})
.toArray();
assert.deepStrictEqual(result, ['this should pass']);
});
assert.deepStrictEqual(result, ['this should pass']);
});

it('should abort when test succeeded', async () => {
const stream = run({
Expand Down

0 comments on commit 8b98c18

Please sign in to comment.