Adding any tests to app.component.spec.ts (even empty ones) causes other tests to fail
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- angular, typescript
- 領域
- testing-qa
調査の方向性
app.component.spec.ts と、src/components/clickerForm/clickerForm.spec.ts および src/components/clickerButton/clickerButton.spec.ts にあるリンクされた 2 つの spec から始めます。リポジトリをクローンし、npm install を実行し、app.component.spec.ts のテストのコメントを外して、npm test を実行し、相互作用を再現します。完了条件は、テストが互いに影響を与える理由を説明し、テストを独立して実行できる状態に戻すことです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 370
- フォーク
- 144
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/ionic-unit-testing-example のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ionic-team/ionic-unit-testing-example#91 · コメント 7 件 · リアクション 11 件 ·
ionic-team/ionic-unit-testing-example の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100