Skip to content

Commit cfff35b

Browse files
grncdrJames Halliday
authored and
James Halliday
committed
Add checks against double-execution of child tests
1 parent 8622bd5 commit cfff35b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/child_ordering.js

+3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ var grandParentRan = false;
2020
var parentRan = false;
2121
var grandChildRan = false;
2222
test('grandparent', function(t) {
23+
t.ok(!grandParentRan, 'grand parent ran twice');
2324
grandParentRan = true;
2425
t.test('parent', function(t) {
26+
t.ok(!parentRan, 'parent ran twice');
2527
parentRan = true;
2628
t.test('grandchild', function(t) {
29+
t.ok(!grandChildRan, 'grand child ran twice');
2730
grandChildRan = true;
2831
t.pass('grand child ran');
2932
t.end();

0 commit comments

Comments
 (0)