You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
555 B

'use strict';
var common = require('../common');
var spawn = require('child_process').spawn;
var assert = require('assert');
var enoentPath = 'foo123';
var spawnargs = ['bar'];
assert.equal(common.fileExists(enoentPath), false);
var enoentChild = spawn(enoentPath, spawnargs);
enoentChild.on('error', common.mustCall(function(err) {
assert.equal(err.code, 'ENOENT');
assert.equal(err.errno, 'ENOENT');
assert.equal(err.syscall, 'spawn ' + enoentPath);
assert.equal(err.path, enoentPath);
assert.deepStrictEqual(err.spawnargs, spawnargs);
}));