-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
restartOnFileChange doesn't work after run completes normally #1640
restartOnFileChange doesn't work after run completes normally #1640
Comments
I have the same problem |
Also got this issue. It does not seem random and reproduces every time then |restartOnFileChange| is true
... and no running tests |
I have similar issues with this option. Tests run the first time, but when changing a file one of two things will happen, no tests will run, or no tests will run and the browser disconnects. It looks like, after a file change, tests are being executed before any files are served. Here is a comparison with DEBUG logging and also logging all TestI have a minimal test: describe('restartOnFileChange', () => {
it('skips tests after the first run', () => {
(true).should.equal(true)
})
}) With
|
Still failing. |
Let me put here a comment on how this issue happens. Step by step what happens (karma 2.0.4) and why the issue appears:
So, once the restartOnFileChange config is set to TRUE, on the second run all the spec results are ignored, and the number of executed specs will be always 0. |
* fix(browser): ensure browser state is EXECUTING when tests start Browser state is EXECUTING when it actually started to execute tests. This state change is triggered by client on actual tests execution start. Introduced an additional browser state CONFIGURING The CONFIGURING state means that the browser is not just CONNECTED for tests, but someone has requested tests execution (and provided a config file). But the provided config file is not yet processed, configuration is not applied or the tests execution is not yet started and we have not received the first event from the remote browser, so the browser object is not yet at EXECUTING state. Refactored browser state names: renamed READY -> CONNECTED Fixes #1640
I just upgraded to 0.13.11 and tried the
restartOnFileChange
option out for the first time.An excerpt from my
karma.conf.js
is:When I kick off a test run, and then quickly edit/save a watched file; I see that the current run is cancelled and a new run starts, as per the docs.
I can repeat this process any number of times; with the same results each time (current run is cancelled, new run starts).
However, if I let the current run continue all the way through to completion; then make a change to a watched file, a new run will start, but it doesn't run any tests.
Example console output is below. It shows:
Finished in 39.126 secs
,1325 tests completed
)foo.js
0 tests completed
:The text was updated successfully, but these errors were encountered: