1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 12:20:04 +02:00
Files
minifyfromhtml/node_modules/npm/test/tap/spawn-enoent-help.js
2022-08-20 18:51:33 +02:00

35 lines
762 B
JavaScript

var path = require("path")
var test = require("tap").test
var rimraf = require("rimraf")
var mkdirp = require("mkdirp")
var common = require("../common-tap.js")
var pkg = path.resolve(__dirname, "spawn-enoent-help")
test("setup", function (t) {
rimraf.sync(pkg)
mkdirp.sync(pkg)
t.end()
})
test("enoent help", function (t) {
common.npm(["help", "config"], {
cwd: pkg,
env: {
PATH: "",
Path: "",
"npm_config_loglevel": "warn",
"npm_config_viewer": "woman"
}
}, function (er, code, sout, serr) {
t.similar(serr, /Check if the file 'emacsclient' is present./)
t.equal(global.cooked, undefined, "Don't leak into global scope")
t.end()
})
})
test("clean", function (t) {
rimraf.sync(pkg)
t.end()
})