Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-process-exit.js « parallel « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 58d7a276996c3c738e39e10fe75f021f34dac69e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
var common = require('../common');
var assert = require('assert');

// calling .exit() from within "exit" should not overflow the call stack
var nexits = 0;

process.on('exit', function(code) {
  assert.equal(nexits++, 0);
  assert.equal(code, 0);
  process.exit();
});

// "exit" should be emitted unprovoked