Adding any tests to app.component.spec.ts (even empty ones) causes other tests to fail
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- angular, typescript
- Ambito
- testing-qa
Direzione di ricerca
Inizia con app.component.spec.ts e le due specifiche collegate in src/components/clickerForm/clickerForm.spec.ts e src/components/clickerButton/clickerButton.spec.ts. Clona il repository, esegui npm install, decommenta i test di app.component.spec.ts ed esegui npm test per riprodurre l’interazione. Il lavoro è completato quando avrai spiegato perché i test si influenzano a vicenda e ripristinato l’esecuzione indipendente dei test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
After migrating from @angular/cli to this testing setup, two of my tests started failing. Both of these tests are long standing and have not been modified in ages.
I tried re-writing one of the tests using the latest recommendations on Stack Overflow, to no avail.
To cut a very long story short, I figured out that commenting out the tests in app.component.spec.ts let the tests run fine.
I also tried empty tests (nothing in the test block at all), as well as adding an afterEach() => destroy, which didn't help.
To Replicate:
git clone git@github.com:lathonez/clicker.gitcd clickernpm install- uncomment the tests in
app.component.spec.ts npm test
Note
I do not expect a solution to this problem, but I consider leaving the repo in it's current state (as long as we are unable to explain the behaviour) pretty dangerous in terms of other user's time. There is nothing at all to make you think that these tests would be affected by app.component.spec.ts, indeed everything we know about the unit testing setup tells us otherwise. You can easily sink several hours into this problem before coming to this point, or just getting frustrated and binning your perfectly valid tests.
- Lingua principale
- TypeScript
- Stelle
- 370
- Fork
- 144
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 ionic-team/ionic-unit-testing-example
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
-
Error output is minified Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
ionic-team/ionic-unit-testing-example#91 · 7 commenti · 11 reazioni ·
Tutte le issue di ionic-team/ionic-unit-testing-example
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
copse-dev/agent-pane#2953 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·