UNPKG

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