mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 14:41:29 +00:00

PR-URL: https://github.com/nodejs/node/pull/3310 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
13 lines
368 B
JavaScript
13 lines
368 B
JavaScript
var test = require('tap').test
|
||
var spawn = require('child_process').spawn
|
||
var node = process.execPath
|
||
var npm = require.resolve('../../')
|
||
var args = [ npm, 'ls', 'ceci n’est pas une package' ]
|
||
test('ls exits non-zero when nothing found', function (t) {
|
||
var child = spawn(node, args)
|
||
child.on('exit', function (code) {
|
||
t.notEqual(code, 0)
|
||
t.end()
|
||
})
|
||
})
|