node/deps/npm/node_modules/read-installed/test/empty.js
Forrest L Norvell e79ccee168 npm: upgrade to v2.1.18
PR-URL: https://github.com/iojs/io.js/pull/266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-08 23:49:03 +01:00

17 lines
527 B
JavaScript

var readInstalled = require("../read-installed.js");
var test = require("tap").test;
var path = require("path");
test("Handle bad path", function (t) {
readInstalled(path.join(__dirname, "../unknown"), {
dev: true,
log: console.error
}, function (er, map) {
t.notOk(er, "er should be null");
t.ok(map, "map should be data");
t.equal(Object.keys(map.dependencies).length, 0, "Dependencies should have no keys");
if (er) return console.error(er.stack || er.message);
t.end();
});
});