readInstalled = require("../read-installed.js")
test = require("tap").test
json = require("../package.json")
path = require("path")
known = [].concat(Object.keys(json.dependencies), Object.keys(json.optionalDependencies), Object.keys(json.devDependencies)).sort()
test "make sure that it works without dev deps", (t) ->
  readInstalled path.join(__dirname, "../"), (er, map) ->
    t.notOk er, "er should be bull"
    t.ok map, "map should be data"
    return console.error(er.stack or er.message)  if er
    deps = Object.keys(map.dependencies).sort()
    t.equal deps.length, known.length, "array lengths are equal"
    t.deepEqual deps, known, "arrays should be equal"
    t.ok map.dependencies.tap.extraneous, "extraneous is set on devDep"
    t.end()
    return

  return

