1var readInstalled = require("../read-installed.js") 2var test = require("tap").test 3var json = require("../package.json") 4var path = require("path") 5var known = [].concat(Object.keys(json.dependencies) 6 , Object.keys(json.optionalDependencies) 7 , Object.keys(json.devDependencies)).sort() 8 9test("make sure that it works without dev deps", function (t) { 10 readInstalled(path.join(__dirname, "../"), function (er, map) { 11 t.notOk(er, "er should be bull") 12 t.ok(map, "map should be data") 13 if (er) return console.error(er.stack || er.message) 14 var deps = Object.keys(map.dependencies).sort() 15 t.equal(deps.length, known.length, "array lengths are equal") 16 t.deepEqual(deps, known, "arrays should be equal") 17 t.ok(map.dependencies.tap.extraneous, 'extraneous is set on devDep') 18 t.end() 19 }) 20}) 21 22