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

Misleading status message when using fit or fdescribe #202

Closed
PhilippMeissner opened this issue Mar 28, 2018 · 14 comments
Closed

Misleading status message when using fit or fdescribe #202

PhilippMeissner opened this issue Mar 28, 2018 · 14 comments

Comments

@PhilippMeissner
Copy link

The output states to have run all available tests, but we were running into "silently failing" tests as no logs are present to explicitly state the number of tests run.

This is the output we have when running all our tests without any fit or fdescribe specs:

Executed 473 of 473 SUCCESS (0.443 secs / 0 secs)

Now, using a single fit on one of the specs:

Executed 473 of 473 SUCCESS (0.454 secs / 0 secs)

If I let the fited test fail explicitly, this is the output

Executed 473 of 473 (1 FAILED) (0.397 secs / 0 secs)

Having fdescribe causes the very same output as above (Both scenarios, with and without failing tests).

We would except an output similar to when xit or xdescribe is present:
(with 1 xit in place)

Executed 472 of 473 (skipped 1) SUCCESS (0.49 secs / 0 secs)

jasmine@3.1.0
jasmine-core@3.1.0
jasmin-local-storage@1.0.0
karma-jasmine@1.1.1

Hit me up if there's additional information required :)

@michAtEl
Copy link

I think I have the same problem. I made a small repository to reproduce the problem:
https://github.com/michAtEl/karma-bug
I have two specs. Spec fit('hello returns hello', function () { is focused with fit. Because of this, the other spec should not run. If it runs, it should fail because of expect(2).toEqual(1);
Output of karma:

31 03 2018 11:05:25.296:WARN [karma]: No captured browser, open http://localhost:9876/
31 03 2018 11:05:25.307:INFO [karma]: Karma v2.0.0 server started at http://0.0.0.0:9876/
31 03 2018 11:05:25.307:INFO [launcher]: Launching browser Chrome with unlimited concurrency
31 03 2018 11:05:25.316:INFO [launcher]: Starting browser Chrome
31 03 2018 11:05:27.128:INFO [Chrome 65.0.3325 (Windows 10.0.0)]: Connected on socket MffgRawUJx5m_oozAAAA with id 89040756
Chrome 65.0.3325 (Windows 10.0.0): Executed 2 of 2 SUCCESS (0.024 secs / 0 secs)

I would like to see something like this:

Executed 1 of 2 SUCCESS (skipped 1) (0.024 secs / 0 secs)

Steps to reproduce:

I'm running:

  • win 10
  • karma-cli version 1.0.1
  • chrome version 65.0.3325.181

This issue might be related to
karma-runner/karma#2587

@michAtEl
Copy link

michAtEl commented Apr 2, 2018

After a downgrade to the latest Version of 2.x ( npm install --save jasmine-core@2.99.1 ) the output is ok:

karma start karma.conf
02 04 2018 10:51:05.481:WARN [karma]: No captured browser, open http://localhost:9876/
02 04 2018 10:51:05.492:INFO [karma]: Karma v2.0.0 server started at http://0.0.0.0:9876/
02 04 2018 10:51:05.493:INFO [launcher]: Launching browser Chrome with unlimited concurrency
02 04 2018 10:51:05.503:INFO [launcher]: Starting browser Chrome
02 04 2018 10:51:07.368:INFO [Chrome 65.0.3325 (Windows 10.0.0)]: Connected on socket n8zN-9nwxlg8Nca9AAAA with id 40420476
Chrome 65.0.3325 (Windows 10.0.0) ERROR: 'DEPRECATION: fit and fdescribe will cause your suite to report an 'incomplete' status in Jasmine 3.0'

Chrome 65.0.3325 (Windows 10.0.0): Executed 1 of 2 (skipped 1) SUCCESS (0.014 secs / 0 secs)

@PhilippMeissner
Copy link
Author

Chrome 65.0.3325 (Windows 10.0.0) ERROR: 'DEPRECATION: fit and fdescribe will cause your suite to report an 'incomplete' status in Jasmine 3.0'

Makes me wonder - We're using 3.1.0 and none of the above do report any different status (Which would be highly appreciated).

@PhilippMeissner
Copy link
Author

It appears this error has been reported to jasmine already, but responsibility for the bug is being pushed back towards karma-jasmine.

jasmine/jasmine#1532

@fetis
Copy link

fetis commented Apr 5, 2018

There's a PR for it #192 and it was even merged, but I was unable to find the new version of it. In my opinion it's critical bug, so I would like to have fix ASAP.

@the-spyke
Copy link

@johnjbarton Any ETA on a release? This bug is stopping us from using Jasmine 3, and the fix is already merged.

@yoni-tock
Copy link

Posting to follow

@whyboris
Copy link

whyboris commented Apr 24, 2018

All it took was 1 line of code change to fix it all: https://github.com/karma-runner/karma-jasmine/pull/192/files#diff-e52a9a67956bd51d044af4058fb939ceR241
Append to the definition of skipped this: || specResult.status === 'excluded'
The associated PR has been merged and will fix the problem instantly.
Every reporter I have is reporting 2000+ passed even when I run only 1 test (via fit) :suspect:
Please craft a new release that includes the merged code ❤️

@saif-adnan
Copy link

Posting to follow

1 similar comment
@ObsidianSky
Copy link

Posting to follow

@christopherthielen
Copy link

Please do not "post to follow". Click the Subscribe button on the right sidebar instead.

screen shot 2018-04-25 at 5 36 23 pm

Sorry for adding to the noise.

@PhilippMeissner
Copy link
Author

PhilippMeissner commented Apr 26, 2018

Please do not "post to follow". Click the Subscribe button on the right sidebar instead.

Maybe people keep posting and add "noise" so that @dignifiedquire or other users with write-access do read and bump the version :)

@whyboris
Copy link

whyboris commented May 3, 2018

New release created 🎉 https://github.com/karma-runner/karma-jasmine/releases/tag/v1.1.2 🎉
Works great, fixes this issue 🎖

@johnjbarton
Copy link
Contributor

Fixed by #192

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

10 participants