Issues when running jest with coverage for all packages within a lerna monorepo
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- testing
調査の方向性
まず、パッケージディレクトリからの Jest coverage と Lerna リポジトリのルートからの coverage を比較し、node_modules/jsdom-worker/src/index.js:89 と、もう一方の monorepo パッケージから import される関数に焦点を当てます。ReferenceError を再現し、なぜ cov_* のインストルメンテーションが worker に到達するのかを特定します。root レベルの coverage 実行がこのエラーなしで行われれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- JavaScript
- スター
- 291
- フォーク
- 20
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
developit/jsdom-worker のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
developit/jsdom-worker#26 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
developit/jsdom-worker#25 · コメント 3 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
developit/jsdom-worker#24 · コメント 32 件 · リアクション 59 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
developit/jsdom-worker#22 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
developit/jsdom-worker#20 · コメント 2 件 ·
developit/jsdom-worker の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
neondatabase/website#5944 ·
-
module: core
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
bigbluebutton/bigbluebutton#25849 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·