UNPKG

440 BJavaScriptView Raw
1var test = require('../');
2
3test('parent', function (t) {
4 t.plan(3)
5
6 var firstChildRan = false;
7
8 t.pass('assertion in parent');
9
10 t.test('first child', function (t) {
11 t.plan(1);
12 t.pass('pass first child');
13 firstChildRan = true;
14 });
15
16 t.test('second child', function (t) {
17 t.plan(2);
18 t.ok(firstChildRan, 'first child ran first');
19 t.pass('pass second child');
20 });
21});