• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1const assert = require('assert');
2
3// https://github.com/nodejs/node/issues/1803
4// this module is used as a preload module. It should have a parent with the
5// module search paths initialized from the current working directory
6assert.ok(module.parent);
7const expectedPaths = require('module')._nodeModulePaths(process.cwd());
8assert.deepStrictEqual(module.parent.paths, expectedPaths);
9
10const cluster = require('cluster');
11cluster.isMaster || process.exit(42 + cluster.worker.id); // +42 to distinguish
12// from exit(1) for other random reasons
13