async error inside before won't cause test error
Version
18, 20, 21
Platform
macos 14
Subsystem
test_runner
What steps will reproduce the bug?
import { before, test } from 'node:test' import { createWriteStream } from 'node:fs' before(() => { const fsStream = createWriteStream(new URL('./not-exist/file.txt', import.meta.url), { encoding: 'utf8' }) fsStream.write('Hello World') fsStream.end() }) test('ok', () => { })
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
No response
What do you see instead?
node --test node-js-fs-stream.mjs ✔ ok (1.033833ms) ℹ tests 1 ℹ suites 0 ℹ pass 1 ℹ fail 0 ℹ cancelled 0 ℹ skipped 0 ℹ todo 0 ℹ duration_ms 43.30675
Additional information
No response