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

When fit (focused) test is used, no other test is reported pending. #142

Closed
johnjbarton opened this issue Apr 25, 2017 · 2 comments
Closed

Comments

@johnjbarton
Copy link
Contributor

I ran a test suite and I got "all green", but when I read closely I see "Ran 1 of 2 specs". Then I recalled that some time ago I set fit() on one test.

Should non-fit tests be reported pending when at least one test is fit()?

I guess the push back could be that the current fit() UI is clean, adding a bunch of pending tests would clutter the focused UI.

Maybe the summary line:
Executed 1 of 2 specs SUCCESS (1 SKIPPED)
should be different. It seems incorrect to say "SUCCESS" for a fit() case. Maybe "INCOMPLETE" in yellow unless skippedSpecs and pendingSpecs are zero? That could be enough to alert a user that they are not done with the suite.

@bcaudan
Copy link
Owner

bcaudan commented Apr 25, 2017

Hi @johnjbarton!

Should non-fit tests be reported pending when at least one test is fit()?

Pending test state is actually handled by jasmine and correspond to these cases:

  • test disabled with xit
  • test disabled by calling pending() function

Skipped is a deducted state corresponding to these cases:

  • test inside a disabled suite xdescribe
  • test not focused (fit or fdescribe)

I guess the push back could be that the current fit() UI is clean, adding a bunch of pending tests would clutter the focused UI.

IIRC we do not have any information for skipped tests, so we could not display a skipped summary.

Maybe the summary line:
Executed 1 of 2 specs SUCCESS (1 SKIPPED)
should be different. It seems incorrect to say "SUCCESS" for a fit() case. Maybe "INCOMPLETE" in yellow unless skippedSpecs and pendingSpecs are zero? That could be enough to alert a user that they are not done with the suite.

I agree, display is really not explicit when tests are skipped.

I would go with these two changes:

  1. Display skipped specs total with pending color (introducing a specific color for skipped does not seem necessary yet)
  2. Display INCOMPLETE (with pending color) instead of SUCCESS if some specs are not executed

I would be pleased to review a PR for that :)

johnjbarton added a commit to johnjbarton/jasmine-spec-reporter that referenced this issue Apr 28, 2017
…CCESS.

Show skipped summary count in pending color.
Fixes bcaudan#142
bcaudan pushed a commit that referenced this issue Apr 29, 2017
…CCESS.

Show skipped summary count in pending color.
Fixes #142
@bcaudan
Copy link
Owner

bcaudan commented Apr 30, 2017

Available in [email protected]

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

2 participants