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.
 
 
 
 
 
 

27 lines
733 B

var fs = require("fs")
var path = require("path")
var test = require("tap").test
var manifest = require("../../package.json")
var deps = Object.keys(manifest.dependencies)
var dev = Object.keys(manifest.devDependencies)
var bundled = manifest.bundleDependencies
test("all deps are bundled deps or dev deps", function (t) {
deps.forEach(function (name) {
t.assert(
bundled.indexOf(name) !== -1,
name + " is in bundledDependencies"
)
})
t.same(
fs.readdirSync(path.resolve(__dirname, "../../node_modules")).filter(function (name) {
return (dev.indexOf(name) === -1) && (name !== ".bin")
}).sort(),
bundled.sort(),
"bundleDependencies matches what's in node_modules"
)
t.end()
})