]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/spawn-enoent-help.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / test / tap / spawn-enoent-help.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/spawn-enoent-help.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/spawn-enoent-help.js
new file mode 100644 (file)
index 0000000..70fb078
--- /dev/null
@@ -0,0 +1,34 @@
+var path = require("path")
+var test = require("tap").test
+var rimraf = require("rimraf")
+var mkdirp = require("mkdirp")
+var common = require("../common-tap.js")
+
+var pkg = path.resolve(__dirname, "spawn-enoent-help")
+
+test("setup", function (t) {
+  rimraf.sync(pkg)
+  mkdirp.sync(pkg)
+  t.end()
+})
+
+test("enoent help", function (t) {
+  common.npm(["help", "config"], {
+    cwd: pkg,
+    env: {
+      PATH: "",
+      Path: "",
+      "npm_config_loglevel": "warn",
+      "npm_config_viewer": "woman"
+    }
+  }, function (er, code, sout, serr) {
+    t.similar(serr, /Check if the file 'emacsclient' is present./)
+    t.equal(global.cooked, undefined, "Don't leak into global scope")
+    t.end()
+  })
+})
+
+test("clean", function (t) {
+  rimraf.sync(pkg)
+  t.end()
+})