codymikol / karma-webpack

Karma webpack Middleware
MIT License
830 stars 221 forks source link

Tests often must be run twice from IDEA in a big code base where Webpack bundling takes time #502

Closed provegard closed 3 years ago

provegard commented 3 years ago

Expected Behavior

When I do this from inside IntelliJ IDEA:

  1. Run tests
  2. Break something in the code being tested
  3. Run the tests again

Then I expect the tests to fail in step 3.

Actual Behavior

The tests sometimes succeed and need to be re-run to fail.

Code

See https://github.com/provegard/slow-karma/tree/karma-webpack

How Do We Reproduce?

Clone https://github.com/provegard/slow-karma and checkout the karma-webpack branch.

From IDEA:

  1. Run a single test file
  2. Change the echo function in main.coffee
  3. Re-run the tests

Sometimes step 3 needs to be repeated twice for the change to have an effect on the test run.

The following screen recording demonstrates the problem.

https://user-images.githubusercontent.com/795010/110707599-d11b5000-81f9-11eb-9b73-9ec3a0562cb5.mp4

provegard commented 3 years ago

After some more testing, it appears this is related to IDEA not autosaving when you re-run tests.