![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/local/lib/node_modules/forever/node_modules/tape/test/ |
Upload File : |
var test = require('../'); var childRan = false; test('parent', function(t) { t.test('child', function(t) { childRan = true; t.pass('child ran'); t.end(); }); t.end(); }); test('uncle', function(t) { t.ok(childRan, 'Child should run before next top-level test'); t.end(); }); 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(); }); t.pass('parent ran'); t.end(); }); t.test('other parent', function(t) { t.ok(parentRan, 'first parent runs before second parent'); t.ok(grandChildRan, 'grandchild runs before second parent'); t.end(); }); t.pass('grandparent ran'); t.end(); }); test('second grandparent', function(t) { t.ok(grandParentRan, 'grandparent ran'); t.ok(parentRan, 'parent ran'); t.ok(grandChildRan, 'grandchild ran'); t.pass('other grandparent ran'); t.end(); }); // vim: set softtabstop=4 shiftwidth=4: