node/deps/npm/test/tap/ls-no-results.js
Rebecca Turner 41923c0c07 deps: upgrade npm to 3.3.6
PR-URL: https://github.com/nodejs/node/pull/3310
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-10-22 13:56:09 -04:00

13 lines
368 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var test = require('tap').test
var spawn = require('child_process').spawn
var node = process.execPath
var npm = require.resolve('../../')
var args = [ npm, 'ls', 'ceci nest 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()
})
})