Skip to content
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

Using browserDisconnectTolerance invalidates test suite #3077

Open
kirahowe opened this issue Jul 16, 2018 · 4 comments
Open

Using browserDisconnectTolerance invalidates test suite #3077

kirahowe opened this issue Jul 16, 2018 · 4 comments

Comments

@kirahowe
Copy link

Expected behaviour

When a test fails, karma says that the test failed.

Actual behaviour

When a test fails and chrome disconnects then reconnects (which is allowed if the browserDisconnectTolerance is set to something greater than 0), karma will only report the results of the tests that have run since reconnecting, ignoring any test failures from before chrome disconnected.

Environment Details

  • Karma version (output of karma --version): 1.7.1
  • Relevant part of your karma.config.js file:
    browserDisconnectTolerance: 1

Steps to reproduce the behaviour

  1. Set browserDisconnectTolerance to anything greater than 0.
  2. Run a test that fails before the browser disconnects, then after reconnecting run a test that passes
  3. Expected: The build should fail and karma should report the test failure from before the disconnection
    Actual: The build passes because karma only reports the results of tests run since the reconnection
@lusarz
Copy link
Contributor

lusarz commented Aug 10, 2018

What is the easiest way to reproduce browser disconnection ?

@johnjbarton
Copy link
Contributor

You can try setting the option introduced in #3102 to 1ms. Otherwise I guess you have to create a special test client.html that drops the connection.

@SayWhat69
Copy link

Have the same problem here.
Karma doesn't report any tests that were run before the timeout.

@M1ghty1
Copy link

M1ghty1 commented Jun 12, 2019

Same here.
Doesn't this issue make browserDisconnectTolerance completely useless?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants