• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1var test = require('tap').test
2var spawn = require('child_process').spawn
3var node = process.execPath
4var npm = require.resolve('../../')
5var args = [ npm, 'ls', 'ceci n’est pas une package' ]
6test('ls exits non-zero when nothing found', function (t) {
7  var child = spawn(node, args)
8  child.on('exit', function (code) {
9    t.notEqual(code, 0)
10    t.end()
11  })
12})
13