diff options
author | isaacs <i@izs.me> | 2014-08-01 04:59:06 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-08-01 04:59:06 +0400 |
commit | 9ec3a39cfcb8bf74342847186bee30f4d518de49 (patch) | |
tree | 32296334e975d806d70ff193de3d7a29e80754aa /test | |
parent | c0119f809506ed8733355505bd7c761ff834dcc5 (diff) |
Add a test to verify that 'npm ls' exits ok in npm repo
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/00-verify-ls-ok.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/tap/00-verify-ls-ok.js b/test/tap/00-verify-ls-ok.js new file mode 100644 index 000000000..7209e7db7 --- /dev/null +++ b/test/tap/00-verify-ls-ok.js @@ -0,0 +1,15 @@ +var test = require("tap").test +var node = process.execPath +var path = require("path") +var cwd = path.resolve(__dirname, "..", "..") +var npm = path.resolve(cwd, "cli.js") +var spawn = require("child_process").spawn + +test("npm ls in npm", function (t) { + var opt = { cwd: cwd, stdio: [ "ignore", "ignore", 2 ] } + var child = spawn(node, [npm, "ls"], opt) + child.on("close", function (code) { + t.notOk(code) + t.end() + }) +}) |