]> gerrit.simantics Code Review - simantics/district.git/blob - 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
1 var common = require("../common-tap")
2 var test = require("tap").test
3 var path = require("path")
4 var cwd = path.resolve(__dirname, "..", "..")
5 var fs = require("fs")
6
7 test("npm ls in npm", function (t) {
8   t.ok(fs.existsSync(cwd), "ensure that the path we are calling ls within exists")
9   var files = fs.readdirSync(cwd)
10   t.notEqual(files.length, 0, "ensure there are files in the directory we are to ls")
11
12   var opt = { cwd: cwd, stdio: [ "ignore", "ignore", 2 ] }
13   common.npm(["ls"], opt, function (err, code) {
14     t.ifError(err, "error should not exist")
15     t.equal(code, 0, "npm ls exited with code")
16     t.end()
17   })
18 })