You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_runner: todo/skip/expectFailure are truthy per docs, but implementation is otherwise #61815
Add the todo, skip or testFailure option to a test, setting it to an empty string. The result will be the same as if you set it to true or a non-empty string.
What is the expected behavior? Why is that the expected behavior?
Unsure whether the bug is in the code or in the API docs.
The code clearly does not treat these options as truthy:
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
Activity
ljharb commentedon Feb 15, 2026
Based on my comment on #47537 (review), this seems like a bug - the empty string should be identical to
false.JakobJingleheimer commentedon Feb 15, 2026
I can't think of a reason for them to not be truthy/falsy, like
skip: 'skip' in opts && !!opts.skipvassudanagunta commentedon Feb 15, 2026
the effective change will be that
'',null,NaNand the various flavors of0will no longer result in a todo/skip/expectFailure.My guess is only the first and maybe the second will likely break any existing clients and even that will be rare.
test_runner: make skip/todo/expectFailure use JS truthiness (nodejs#6…
test_runner:make skip/todo/expectFailure use JS truthiness (nodejs#61815
github-actions commentedon Jul 20, 2026
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
vassudanagunta commentedon Jul 20, 2026
still an issue