`node:test` Tests without callback should not be reported as ok
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 122k
- Fork
- 37.3k
- Merge medio
- 4g 2h
- PR unite (30g)
- 283
Descrizione
Version
26.7.0
Platform
Subsystem
No response
What steps will reproduce the bug?
describe('two todos', () => {
// TODO
it('should handle first case', (t) => {
t.todo();
});
// TODO
it('should handle second case');
});
This would report as
ℹ tests 2
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 1
How often does it reproduce? Is there a required condition?
Deterministic
What is the expected behavior? Why is that the expected behavior?
A test with no body, thus that doesn't test anything, should not be reported as OK.
It usually indicates a test that's TODO, so the existing feature of reporting todos may be the most relevant option there, and I think (?) it would be non-breaking for existing test suites.
What do you see instead?
TODO/incomplete test reported as pass
Additional information
Hi there 👋
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 riproducendo il problema con l’esempio describe/it di node:test fornito su Node.js 26.7.0, quindi traccia il modo in cui i test senza callback vengono classificati nell’implementazione di node:test e nei relativi test. Il lavoro è completato quando un test vuoto non viene più segnalato come superato e viene classificato in modo coerente con il comportamento todo previsto, preservando la reportistica dei test esistente.
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à
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100