mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
527 B
17 lines
527 B
10 years ago
|
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();
|
||
|
});
|
||
|
});
|