karma-runner/karma
View on GitHubUsing autoWatch with a **/* glob doesn't update the reports
Open
#2203 opened on Jun 27, 2016
help wantedtype: bug
Description
Expected behavior
autoWatch should work and report correct results with glob matchers of src/app/**/*.js
Actual behavior
Reports are not updating to the correct result in autoWatch when using a matcher like src/app/**/*.js
Enviroment Details
- Karma version (output of
karma --version): 1.1.0 - Relevant part of your
karma.config.jsfile files
Steps to reproduce the behaviour
I've prepared an example project at - https://github.com/shairez/karma-autowatch-problem-example
- Before going through the steps below, clone the project
Here are the steps:
karma start- Verify that you see the
Executed 1 of 1 SUCCESSmessage - Go to
registration.component.spec.js - On line 25 change
ctrl.createAccount()toctrl.createAccount2() - You should see a failing test message in the karma report, but you see the same
SUCCESSmessage from before
It is solved when you change the glob matcher
I managed to find out that it's got to do with the glob matcher in the files configuration in karma.conf.js.
- Go to
karma.conf.js, - Comment line 12 where it says
'src/app/**/*.js' - Uncomment line 13 where it says
'src/app/**/*.{component,service}.js' - You should now see the autoWatch works correctly
Bottom line
Something with 'src/app/**/*.js' breaks the autoWatch reporting behavior