• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1var test = require('tap').test
2var common = require('../common-tap')
3
4test('npm food', function (t) {
5  common.npm('docz', {}, function (err, code, stdout, stderr) {
6    if (err) throw err
7    t.equal(code, 1, 'command ran with error')
8
9    t.has(stdout, 'Did you mean this?')
10
11    t.notOk(stderr, 'stderr should be empty')
12    t.end()
13  })
14})
15
16test('npm jet', function (t) {
17  common.npm('jet', {}, function (err, code, stdout, stderr) {
18    if (err) throw err
19    t.equal(code, 1, 'command ran with error')
20
21    t.has(stdout, 'Did you mean one of these?')
22
23    t.notOk(stderr, 'stderr should be empty')
24    t.end()
25  })
26})
27