src: don't error at startup when cwd doesn't exist
[platform/upstream/nodejs.git] / test / parallel / test-next-tick.js
1 var common = require('../common');
2 var assert = require('assert');
3
4 var complete = 0;
5
6 process.nextTick(function() {
7   complete++;
8   process.nextTick(function() {
9     complete++;
10     process.nextTick(function() {
11       complete++;
12     });
13   });
14 });
15
16 setTimeout(function() {
17   process.nextTick(function() {
18     complete++;
19   });
20 }, 50);
21
22 process.nextTick(function() {
23   complete++;
24 });
25
26 process.on('exit', function() {
27   assert.equal(5, complete);
28   process.nextTick(function() {
29     throw new Error('this should not occur');
30   });
31 });