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.

21 lines
514 B

var path = require("path")
var assert = require("assert")
process.env.npm_config_prefix = process.cwd()
delete process.env.npm_config_global
delete process.env.npm_config_depth
var npm = process.env.npm_execpath
require("child_process").exec(npm + " ls --json", {
env: process.env, cwd: process.cwd() },
function (err, stdout, stderr) {
if (err) throw err
var actual = JSON.parse(stdout).dependencies
var expected = require("./npm-ls.json").dependencies
assert.deepEqual(actual, expected)
})