Karma: --auto-watch broken in 3.1.3 (works in 3.1.1)

Created on 15 Dec 2018  路  4Comments  路  Source: karma-runner/karma

Expected behaviour

  • Karma will detect file change, automatically rerun tests with --auto-watch option, and changes will be reflected in the test output.

Actual behaviour

  1. Saving changes to a test file triggers tests to rerun but changes are not reflected. Saving the test file a second time (without making changes) triggers tests to rerun again, this time with changes reflected.
  2. Saving changes to a source file triggers tests to rerun but changes are not reflected. Only saving a test file will result in changes to a source file being reflected.

Environment Details

Steps to reproduce the behaviour

  1. Clone css-vars-ponyfill release 1.16.0. This version is running Karma 3.1.3
  2. On CLI: npm run dev. This runs both the build and test tasks in watch mode.
  3. Edit one of the files in the /tests directory. Notice the file has to be saved twice in order for changes to be reflected.
  4. Edit one of the files in the /src directory. Notice the changes are not reflected until a file in /tests is saved.
  5. Downgrade to Karma 3.1.1: npm i -D [email protected]
  6. Perform steps 3 and 4 again. Notice that changes to test and source files are reflected immediately after saving (as expected).

Most helpful comment

Same here. Downgrading to 3.1.1 works as expected (tests effectively re-run)

All 4 comments

I can confirm I'm seeing the same with the 3.1.3 release. If I pin the version to 3.1.1 in package.json then the bug goes away.

Same here. Downgrading to 3.1.1 works as expected (tests effectively re-run)

This seems to be a duplicate of https://github.com/karma-runner/karma/issues/3226, which is fixed by https://github.com/karma-runner/karma/pull/3230. Just wait for a new release.

Appears to be fixed in 3.1.4.

Thanks for the quick turnaround! 馃帀

Was this page helpful?
0 / 5 - 0 ratings