]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/00-verify-ls-ok.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / test / tap / 00-verify-ls-ok.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/00-verify-ls-ok.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/00-verify-ls-ok.js
new file mode 100644 (file)
index 0000000..aa6acdb
--- /dev/null
@@ -0,0 +1,18 @@
+var common = require("../common-tap")
+var test = require("tap").test
+var path = require("path")
+var cwd = path.resolve(__dirname, "..", "..")
+var fs = require("fs")
+
+test("npm ls in npm", function (t) {
+  t.ok(fs.existsSync(cwd), "ensure that the path we are calling ls within exists")
+  var files = fs.readdirSync(cwd)
+  t.notEqual(files.length, 0, "ensure there are files in the directory we are to ls")
+
+  var opt = { cwd: cwd, stdio: [ "ignore", "ignore", 2 ] }
+  common.npm(["ls"], opt, function (err, code) {
+    t.ifError(err, "error should not exist")
+    t.equal(code, 0, "npm ls exited with code")
+    t.end()
+  })
+})