UNPKG

1.13 kBJavaScriptView Raw
1var test = require('../');
2var ran = 0;
3
4var concat = require('concat-stream');
5var tap = require('tap');
6
7tap.test('test SKIP comment', function (assert) {
8 assert.plan(1);
9
10 var verify = function (output) {
11 assert.equal(output.toString('utf8'), [
12 'TAP version 13',
13 '# SKIP skipped',
14 '',
15 '1..0',
16 '# tests 0',
17 '# pass 0',
18 '',
19 '# ok',
20 ''
21 ].join('\n'));
22 };
23
24 var tapeTest = test.createHarness();
25 tapeTest.createStream().pipe(concat(verify));
26 tapeTest('skipped', { skip: true }, function (t) {
27 t.end();
28 });
29});
30
31test('skip this', { skip: true }, function (t) {
32 t.fail('this should not even run');
33 ran++;
34 t.end();
35});
36
37test.skip('skip this too', function (t) {
38 t.fail('this should not even run');
39 ran++;
40 t.end();
41});
42
43test('skip subtest', function (t) {
44 ran++;
45 t.test('skip this', { skip: true }, function (t) {
46 t.fail('this should not even run');
47 t.end();
48 });
49 t.end();
50});
51
52// vim: set softtabstop=4 shiftwidth=4: