node/test/parallel/test-eval-require.js
Rich Trott 6abd8b587e test: remove unused modules
Many tests use require() to import modules that subsequently never gets
used. This removes those imports and, in a few cases, removes other
unused variables from tests.

PR-URL: https://github.com/nodejs/node/pull/4475
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-01-01 16:37:02 -08:00

14 lines
307 B
JavaScript

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