From 56c63e1e98f12b92ee4eba9d95ec152b2664959e Mon Sep 17 00:00:00 2001 From: Ed Abbondanzio Date: Mon, 29 Jul 2024 22:19:29 -0400 Subject: [PATCH] add test plan --- test/parallel/test-runner-run.mjs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-runner-run.mjs b/test/parallel/test-runner-run.mjs index 47aec7f87738fa..29b39049c1af0f 100644 --- a/test/parallel/test-runner-run.mjs +++ b/test/parallel/test-runner-run.mjs @@ -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));