Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ls-no-results.js « tap « test - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10f3ce00145c352c42540aff4a27f61269a29c4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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()
  })
})