diff options
Diffstat (limited to 'deps/npm/test/tap/help.js')
-rw-r--r-- | deps/npm/test/tap/help.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/deps/npm/test/tap/help.js b/deps/npm/test/tap/help.js new file mode 100644 index 0000000000..0b8c22a7b8 --- /dev/null +++ b/deps/npm/test/tap/help.js @@ -0,0 +1,26 @@ +var test = require('tap').test +var common = require('../common-tap') + +test('npm food', function (t) { + common.npm('food', {}, function (err, code, stdout, stderr) { + if (err) throw err + t.equal(code, 1, 'command ran with error') + + t.has(stdout, 'Did you mean this?') + + t.notOk(stderr, 'stderr should be empty') + t.end() + }) +}) + +test('npm jet', function (t) { + common.npm('jet', {}, function (err, code, stdout, stderr) { + if (err) throw err + t.equal(code, 1, 'command ran with error') + + t.has(stdout, 'Did you mean one of these?') + + t.notOk(stderr, 'stderr should be empty') + t.end() + }) +}) |