UNPKG

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