Issues when running jest with coverage for all packages within a lerna monorepo
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- testing
Direzione di ricerca
Inizia confrontando la coverage di Jest dalla directory del package con la coverage dalla radice del repository Lerna, concentrandoti su node_modules/jsdom-worker/src/index.js:89 e sulla funzione importata dall’altro package del monorepo. Riproduci il ReferenceError e determina perché la strumentazione cov_* raggiunge il worker; il lavoro è completato quando la coverage a livello di root viene eseguita senza questo errore.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I am not 100% sure if my problem really is jsdom-worker related but I guess here is my best starting point:
I am currently working on a lerna monorepo where one of the packages executes a function in a worker. I therefore included jsdom-worker in the corresponding test for this package. The function is an export from a different file of this package. I had to add /* istanbul ignore file */ to it because otherwise the coverage would fail due to cov_* variables added during testing not being reachable for the worker. Jest is used for testing and coverage.
So far this would be OK - and tests as well as coverage run just fine when run localy from within the package.
But if I do run the coverage from the root directory it always fails with ReferenceError: cov_2j8vgqrgle is not defined in node_modules/jsdom-worker/src/index.js:89:18.
The function that is run in the worker has a function imported from another package of the monorepo and if I do run global coverage (remember: running coverage from within the package is 100% fine) this one seems to be interpreted and cov_* gets added to it which is guaranteed to fail.
Any idea what goes wrong and if there is anything I can do about it?
- Lingua principale
- JavaScript
- Stelle
- 291
- Fork
- 20
- 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 developit/jsdom-worker
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
developit/jsdom-worker#26 · 2 commenti ·
-
Support import and require Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
developit/jsdom-worker#25 · 3 commenti · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
developit/jsdom-worker#24 · 32 commenti · 59 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
developit/jsdom-worker#22 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
developit/jsdom-worker#20 · 2 commenti ·
Tutte le issue di developit/jsdom-worker
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
neondatabase/website#5944 ·
-
module: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·