mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 23:25:21 +00:00

* Check SHA before using files from cache * adduser: allow change of the saved password * Make `npm install` respect `config.unicode` * Fix lifecycle to pass `Infinity` for config env value * Don't return 0 exit code on invalid command * cache: Handle 404s and other HTTP errors as errors * bump tap dep, make tests stderr a bit quieter * Resolve ~ in path configs to env.HOME * Include npm version in default user-agent conf * npm init: Use ISC as default license, use save-prefix for deps * Many test and doc fixes
30 lines
719 B
JavaScript
30 lines
719 B
JavaScript
var test = require("tap").test
|
|
var node = process.execPath
|
|
var common = require("../common-tap.js")
|
|
|
|
var opts = { cwd: process.cwd() }
|
|
|
|
test("npm asdf should return exit code 1", function(t) {
|
|
common.npm(["asdf"], opts, function (er, c) {
|
|
if (er) throw er
|
|
t.ok(c, "exit code should not be zero")
|
|
t.end()
|
|
})
|
|
})
|
|
|
|
test("npm help should return exit code 0", function(t) {
|
|
common.npm(["help"], opts, function (er, c) {
|
|
if (er) throw er
|
|
t.equal(c, 0, "exit code should be 0")
|
|
t.end()
|
|
})
|
|
})
|
|
|
|
test("npm help fadf should return exit code 0", function(t) {
|
|
common.npm(["help", "fadf"], opts, function (er, c) {
|
|
if (er) throw er
|
|
t.equal(c, 0, "exit code should be 0")
|
|
t.end()
|
|
})
|
|
})
|