test_runner: todo/skip/expectFailure are truthy per docs, but implementation is otherwise
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 122k
- Fork
- 37.3k
- Merge medio
- 4g 2h
- PR unite (30g)
- 283
Descrizione
Version
v25.6.1
Subsystem
node:test
What steps will reproduce the bug?
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:
https://github.com/nodejs/node/blob/2de34822cc9a19621a663e3f22b00b9a01697635/lib/internal/test_runner/test.js#L639-L641
But the docs specifically state they should be:
Additional information
Previous discussions:
- Three years ago: https://github.com/nodejs/node/pull/47537#pullrequestreview-1383887199 @ljharb
- More recently as part of
expectFailuredevelopment: https://github.com/nodejs/test-runner/pull/10#discussion_r2739831598 @JakobJingleheimer
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da lib/internal/test_runner/test.js intorno alle righe 639-641 e dalle descrizioni delle opzioni in doc/api/test.md intorno alle righe 1691-1696. Esamina le discussioni collegate per determinare se le stringhe vuote debbano essere considerate abilitate o se la documentazione sia errata. Il lavoro è completato quando la documentazione e l'implementazione concordano e sono presenti test per i valori vuoti, true e non vuoti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100