UNPKG

865 BJavaScriptView Raw
1var test = require('../');
2var ran = 0;
3
4test('do not skip this', { skip: false }, function(t) {
5 t.pass('this should run');
6 ran ++;
7 t.end();
8});
9
10test('skip this', { skip: true }, function(t) {
11 t.fail('this should not even run');
12 ran++;
13 t.end();
14});
15
16test.skip('skip this too', function(t) {
17 t.fail('this should not even run');
18 ran++;
19 t.end();
20});
21
22test('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
36test('right number of tests ran', function(t) {
37 t.equal(ran, 3, 'ran the right number of tests');
38 t.end();
39});
40
41// vim: set softtabstop=4 shiftwidth=4: