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

Karma reported test duration is negative #143

Closed
reustonium opened this issue Nov 28, 2016 · 0 comments
Closed

Karma reported test duration is negative #143

reustonium opened this issue Nov 28, 2016 · 0 comments

Comments

@reustonium
Copy link

reustonium commented Nov 28, 2016

Originally reported to the Karma project.

Expected behaviour

Running karma tests takes ~12 seconds, expect test duration (runtime) to be ~12 seconds.

Actual behaviour

PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 316 of 316 SUCCESS (1.959 secs / -41118 mins 50.274 secs)
TOTAL: 316 SUCCESS

Environment Details

Angular Yeoman Project.
Windows 7

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

Steps to reproduce the behaviour

  1. grunt test
  2. observe large negative test duration.

I think I found the issue, one of the tests is using jasmine.clock().mocktime(time) and that seems to be screwing up how Karma reports the duration for the test. Since the mocked time is far enough in the past I'm guessing that the signed integer is getting flipped and going way negative.

dignifiedquire added a commit that referenced this issue Nov 29, 2016
fix: Karma reported test duration is negative fix #143
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

1 participant