1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-04 20:40:07 +02:00

update packages to latest version

This commit is contained in:
s2
2022-08-20 18:51:33 +02:00
parent 09663a35a5
commit 806ebf9a57
4513 changed files with 366205 additions and 92512 deletions

47
node_modules/npm/test/tap/npm-api-not-loaded-error.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
var test = require("tap").test
var npm = require("../..")
var path = require("path")
var rimraf = require("rimraf")
var npmrc = path.join(__dirname, "npmrc")
var fs = require("fs")
test("setup", function (t) {
fs.writeFileSync(npmrc, "foo = bar\n", "ascii")
t.end()
})
test("calling set/get on config pre-load should throw", function (t) {
var threw = true
try {
npm.config.get("foo")
threw = false
} catch (er) {
t.equal(er.message, "npm.load() required")
} finally {
t.ok(threw, "get before load should throw")
}
threw = true
try {
npm.config.set("foo", "bar")
threw = false
} catch (er) {
t.equal(er.message, "npm.load() required")
} finally {
t.ok(threw, "set before load should throw")
}
npm.load({ userconfig: npmrc }, function (er) {
if (er)
throw er
t.equal(npm.config.get("foo"), "bar")
npm.config.set("foo", "baz")
t.equal(npm.config.get("foo"), "baz")
t.end()
})
})
test("cleanup", function (t) {
rimraf.sync(npmrc)
t.end()
})