diff options
author | Daijiro Wachi <daijiro.wachi@gmail.com> | 2015-04-26 23:43:22 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-05-01 04:38:48 +0300 |
commit | 4b564f0ce979dc74c09604f4d46fd25a2ee63804 (patch) | |
tree | ea2c059b63c3e23a051f04e11984e610c447f003 /test | |
parent | b5740767c320c1eff3576a8d63952534a0fbb936 (diff) |
bin: examines path in different os
add unit test
use osenv
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/bin.js | 17 |
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() + }) +}) |