1 | var test = require('../');
|
2 | var ran = 0;
|
3 |
|
4 | test('do not skip this', { skip: false }, function(t) {
|
5 | t.pass('this should run');
|
6 | ran ++;
|
7 | t.end();
|
8 | });
|
9 |
|
10 | test('skip this', { skip: true }, function(t) {
|
11 | t.fail('this should not even run');
|
12 | ran++;
|
13 | t.end();
|
14 | });
|
15 |
|
16 | test.skip('skip this too', function(t) {
|
17 | t.fail('this should not even run');
|
18 | ran++;
|
19 | t.end();
|
20 | });
|
21 |
|
22 | test('skip subtest', function(t) {
|
23 | ran ++;
|
24 | t.test('do not skip this', { skip: false }, function(t) {
|
25 | ran ++;
|
26 | t.pass('this should run');
|
27 | t.end();
|
28 | });
|
29 | t.test('skip this', { skip: true }, function(t) {
|
30 | t.fail('this should not even run');
|
31 | t.end();
|
32 | });
|
33 | t.end();
|
34 | });
|
35 |
|
36 | test('right number of tests ran', function(t) {
|
37 | t.equal(ran, 3, 'ran the right number of tests');
|
38 | t.end();
|
39 | });
|
40 |
|
41 |
|