0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-eval-require.js
James M Snell 07b54ec4ca test: various test improvements
* Favor strictEqual
* Use const where appropriate
* Modernize where possible

PR-URL: https://github.com/nodejs/node/pull/8468
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-10-10 08:52:03 -07:00

13 lines
334 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;
const options = {
cwd: common.fixturesDir
};
const child = spawn(process.execPath, ['-e', 'require("foo")'], options);
child.on('exit', common.mustCall((code) => {
assert.strictEqual(code, 0);
}));