Skip to content

Commit

Permalink
Add checks against double-execution of child tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr authored and James Halliday committed Oct 25, 2013
1 parent 8622bd5 commit cfff35b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/child_ordering.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ var grandParentRan = false;
var parentRan = false;
var grandChildRan = false;
test('grandparent', function(t) {
t.ok(!grandParentRan, 'grand parent ran twice');
grandParentRan = true;
t.test('parent', function(t) {
t.ok(!parentRan, 'parent ran twice');
parentRan = true;
t.test('grandchild', function(t) {
t.ok(!grandChildRan, 'grand child ran twice');
grandChildRan = true;
t.pass('grand child ran');
t.end();
Expand Down

0 comments on commit cfff35b

Please sign in to comment.