Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaijiro Wachi <daijiro.wachi@gmail.com>2015-04-26 23:43:22 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-05-01 04:38:48 +0300
commit4b564f0ce979dc74c09604f4d46fd25a2ee63804 (patch)
treeea2c059b63c3e23a051f04e11984e610c447f003 /test
parentb5740767c320c1eff3576a8d63952534a0fbb936 (diff)
bin: examines path in different os
add unit test use osenv
Diffstat (limited to 'test')
-rw-r--r--test/tap/bin.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/tap/bin.js b/test/tap/bin.js
new file mode 100644
index 000000000..2eb439843
--- /dev/null
+++ b/test/tap/bin.js
@@ -0,0 +1,17 @@
+var path = require("path")
+var test = require("tap").test
+var common = require("../common-tap.js")
+var opts = { cwd: __dirname }
+var binDir = "../../node_modules/.bin"
+var fixture = path.resolve(binDir)
+
+test('npm bin', function (t) {
+ common.npm(["bin"], opts, function (err, code, stdout, stderr) {
+ t.ifError(err, "bin ran without issue")
+ t.notOk(stderr, "should have no stderr")
+ t.equal(code, 0, "exit ok")
+ var res = path.resolve(stdout)
+ t.equal(res, fixture + "\n")
+ t.end()
+ })
+})