-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The standard indicates that skipped assertions should be summarized at the end of output, and the specified place for # SKIP and # TODO is before the message.
- Loading branch information
1 parent
a1e8f7e
commit 022c26c
Showing
3 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
var tape = require('../'); | ||
var tap = require('tap'); | ||
var concat = require('concat-stream'); | ||
|
||
tap.test('skip output test', function (tt) { | ||
tt.plan(1); | ||
|
||
var test = tape.createHarness({ exit : false }); | ||
test.createStream().pipe(concat(function (body) { | ||
tt.equal( | ||
body.toString('utf8'), | ||
'TAP version 13\n' | ||
+ '# skip assertions\n' | ||
+ 'ok 1 # SKIP not enough pylons\n' | ||
+ '# skip subtests\n' | ||
+ '\n' | ||
+ '1..1\n' | ||
+ '# tests 1\n' | ||
+ '# skip 1\n' | ||
+ '# pass 0\n' | ||
+ '\n' | ||
+ '# ok\n' | ||
); | ||
})); | ||
|
||
// doesn't look like test.skip is available with createHarness() | ||
// test.skip('we require more minerals', function (t) { | ||
// t.plan(1); | ||
// t.fail('should not fail test.skip()'); | ||
// }); | ||
|
||
test('we require more vespene gas', { skip: true }, function (t) { | ||
t.plan(1); | ||
t.fail('should not fail test with { skip: true}'); | ||
}); | ||
|
||
test('skip assertions', function (t) { | ||
t.plan(1); | ||
t.skip('not enough pylons'); | ||
}); | ||
|
||
test('skip subtests', function (t) { | ||
// doesn't look like test.skip is available with createHarness() | ||
// test.skip('build more farms', function (t) { | ||
// t.plan(1) | ||
// t.fail('should not run subtest with test.skip()'); | ||
// }); | ||
test('we require more ziggurats', { skip: true }, function (t) { | ||
t.plan(1) | ||
t.fail('should not run subtest with { skip: true }'); | ||
}); | ||
t.end(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters