Skip to content

Commit

Permalink
add test plan
Browse files Browse the repository at this point in the history
  • Loading branch information
EddieAbbondanzio committed Jan 1, 2025
1 parent ba3e525 commit 56c63e1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/parallel/test-runner-run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -194,25 +194,26 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
});
});

it('should include test type in enqueue, dequeue events', async () => {
it('should include test type in enqueue, dequeue events', async (t) => {
const stream = await run({
files: [join(testFixtures, 'default-behavior/test/suite_and_test.cjs')],
});
t.plan(4);

stream.on('test:enqueue', common.mustCall((data) => {
if (data.name === 'this is a suite') {
assert.strictEqual(data.type, 'suite');
t.assert.strictEqual(data.type, 'suite');
}
if (data.name === ' this is a test') {
assert.strictEqual(data.type, 'test');
if (data.name === 'this is a test') {
t.assert.strictEqual(data.type, 'test');
}
}, 2));
stream.on('test:dequeue', common.mustCall((data) => {
if (data.name === 'this is a suite') {
assert.strictEqual(data.type, 'suite');
t.assert.strictEqual(data.type, 'suite');
}
if (data.name === ' this is a test') {
assert.strictEqual(data.type, 'test');
if (data.name === 'this is a test') {
t.assert.strictEqual(data.type, 'test');
}
}, 2));

Expand Down

0 comments on commit 56c63e1

Please sign in to comment.