1var readInstalled = require("../read-installed.js"); 2var test = require("tap").test; 3var path = require("path"); 4 5test("Handle bad path", function (t) { 6 readInstalled(path.join(__dirname, "../unknown"), { 7 dev: true, 8 log: console.error 9 }, function (er, map) { 10 t.notOk(er, "er should be null"); 11 t.ok(map, "map should be data"); 12 t.equal(Object.keys(map.dependencies).length, 0, "Dependencies should have no keys"); 13 if (er) return console.error(er.stack || er.message); 14 t.end(); 15 }); 16}); 17