It seems there is some odd behavior with only and subtests, because I expected the following to pass:
consttest=require('node:test')test('this should be run',{only: true},(t)=>{t.test('this should be run',{only: true},(t)=>{})t.test('this should not be run',(t)=>{})})But it's failing with an odd error
▶ this should be run
✔ this should be run (0.320833ms)
✖ this should not be run (0.216167ms)
'test did not finish before its parent and was cancelled'
▶ this should be run (1.850417ms)
ℹ tests 3
ℹ suites 0
ℹ pass 1
ℹ fail 1
ℹ cancelled 1
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 0.11275
✖ failing tests:
✖ this should not be run (0.216167ms)
'test did not finish before its parent and was cancelled'
It seems there is some odd behavior with
onlyand subtests, because I expected the following to pass:But it's failing with an odd error