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.

13 lines
368 B

var test = require("tap").test
var spawn = require("child_process").spawn
11 years ago
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) {
11 years ago
var child = spawn(node, args)
child.on("exit", function (code) {
11 years ago
t.notEqual(code, 0)
t.end()
})
})