Closed
Description
Version
20.1.0
Platform
Darwin my-macOS-1331-my-serial-number.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
Subsystem
No response
What steps will reproduce the bug?
run this with node --test-only
const {it, describe} = require('node:test');
describe.only('this is describe', () => {
it.only('should only run this', () => {
console.log('test 1');
});
it('should not run this', () => {
console.log('test 2');
});
});
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
to only log test 1
What do you see instead?
I see that both tests are logged:
test 1
test 2
▶ this is describe
✔ should only run this (0.615625ms)
✔ should not run this (0.070041ms)
▶ this is describe (1.4065ms)
ℹ tests 2
ℹ suites 1
ℹ pass 2
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4.498084
Additional information
All I'm trying to do is run a single it
that inside a describe