Skip to content

Commit a4aca94

Browse files
WIP: troubleshoot failing test
1 parent c82f2c8 commit a4aca94

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-runner-no-isolation-hooks.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,24 @@ const order = [
4343
'after(): global',
4444
'after one: <root>',
4545
'after two: <root>',
46-
];
46+
].join('\n');
4747

4848
test('Using --require to define global hooks works', async (t) => {
49-
const spawned = await common.spawnPromisified(process.execPath, [
49+
const { stdout } = await common.spawnPromisified(process.execPath, [
5050
...testArguments,
5151
'--require', fixtures.path('test-runner', 'no-isolation', 'global-hooks.js'),
5252
...testFiles,
5353
]);
5454

55-
t.assert.ok(spawned.stdout.includes(order.join('\n')));
55+
t.assert.equal(stdout, order);
5656
});
5757

5858
test('Using --import to define global hooks works', async (t) => {
59-
const spawned = await common.spawnPromisified(process.execPath, [
59+
const { stdout } = await common.spawnPromisified(process.execPath, [
6060
...testArguments,
6161
'--import', fixtures.fileURL('test-runner', 'no-isolation', 'global-hooks.js'),
6262
...testFiles,
6363
]);
6464

65-
t.assert.ok(spawned.stdout.includes(order.join('\n')));
65+
t.assert.equal(stdout, order);
6666
});

0 commit comments

Comments
 (0)