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

Skipped tests are not as convenient as they could be #90

Open
stuartlangridge opened this issue Jun 13, 2014 · 3 comments
Open

Skipped tests are not as convenient as they could be #90

stuartlangridge opened this issue Jun 13, 2014 · 3 comments

Comments

@stuartlangridge
Copy link

If I mark a test as skipped with

t.test("Some tests", function(t) {
    t.plan(1);
    t.test("some test", {skip:true}, function(t) { ... });
    t.end();
});
  1. it is no longer counted in the plan, meaning that I have to alter the plan number when I mark a test as skipped, which is rather annoying (I might as well just comment the test out), and
  2. A skipped test isn't drawn to my attention very clearly.

It might be nice if skipped tests still counted in the plan (so one doesn't have to alter the plan number), and if the number of skipped tests were reported along with passed, failed, and total tests at the end of the test run.

@andrewdeandrade
Copy link
Contributor

@stuartlangridge This looks to be a bug since the TAP version 13 specification shows skipped tests as counting towards the plan count.

See the section "Skipping a few" in http://testanything.org/tap-version-13-specification.html

@flimzy
Copy link

flimzy commented Oct 22, 2014

+1. IMO, the only reason to support skip at all is to count intentionally un-completed tests in the plan. Otherwise I could use any sort of external flow control to skip tests.

@davidmason
Copy link

I am happy to have a go at fixing the following things if they're wanted:

  • show skipped assertions like in the spec, e.g. ok 23 # skip Insufficient flogiston pressure.
  • show skipped tests like in the spec, e.g. 1..0 # Skipped: WWW::Mechanize not installed
  • include the count of skipped tests in the generated output, like the spec says:

If the whole test file succeeds, the count of skipped tests is included in the generated output.

That would also cover #115

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

4 participants