Multiple stubbings with throwException causes unexpected behavior
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- testing
Direzione di ricerca
Start by reproducing the two-stubbing example in the issue and review the related issue #180. Trace how matching stubbings are selected when the first uses thenThrow and the second uses thenReturn. Done means the observed behavior is resolved or a verified workaround is documented.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When you set two stubbings that match the same invocation with the first stubbing calling throwException declaring the second stubbing trigger the exception of the first stubbing.
Example :
td.when(dep()).thenThrow(new Error())
td.when(dep()).thenReturn(true)
Executing the above code will throw an error of type Error.
I think it relates to this issue. Not sure if it can be fixed in testdouble but is there at least a workaround ?
- Lingua principale
- JavaScript
- Stelle
- 1.4k
- Fork
- 141
- Merge medio
- 2h 30m
- PR unite (30g)
- 10
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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.
Altre issue di testdouble/testdouble.js
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
testdouble/testdouble.js#529 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
testdouble/testdouble.js#296 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
testdouble/testdouble.js#281 · 5 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
testdouble/testdouble.js#276 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
testdouble/testdouble.js#275 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di testdouble/testdouble.js
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
[quality] Nothing keeps docs/skills/manifest.md in sync with docs/skills/*.mdForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
apache/rocketmq-dashboard#6610 ·
I maintainer di solito rispondono entro 3 giorni
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
githubnext/gh-aw-workshop#4535 ·
I maintainer di solito rispondono entro 1 giorno
-
Global update drops overrideAccess, so Local API updateGlobal fails filterOptions validation (3.90 regression)Forse già presa @PINYOPATTANAWASANPORN l’ha presa oggi. Apertaarea: core Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
payloadcms/payload#18674 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno