1 | 'use strict';
|
2 |
|
3 | var test = require('../');
|
4 | var ran = 0;
|
5 |
|
6 | var concat = require('concat-stream');
|
7 | var tap = require('tap');
|
8 |
|
9 | tap.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 |
|
33 | test('skip this', { skip: true }, function (t) {
|
34 | t.fail('this should not even run');
|
35 | ran++;
|
36 | t.end();
|
37 | });
|
38 |
|
39 | test.skip('skip this too', function (t) {
|
40 | t.fail('this should not even run');
|
41 | ran++;
|
42 | t.end();
|
43 | });
|
44 |
|
45 | test('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 |
|