mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 12:40:05 +02:00
update packages to latest version
This commit is contained in:
81
node_modules/npm/test/tap/config-private.js
generated
vendored
Normal file
81
node_modules/npm/test/tap/config-private.js
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
var fs = require("fs")
|
||||
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, "config-private")
|
||||
var opts = { cwd: pkg }
|
||||
|
||||
test("setup", function (t) {
|
||||
rimraf.sync(pkg)
|
||||
mkdirp.sync(pkg)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test("config get private var (old auth)", function (t) {
|
||||
common.npm([
|
||||
"config",
|
||||
"get",
|
||||
"_auth"
|
||||
],
|
||||
opts,
|
||||
function (err, code, stdout, stderr) {
|
||||
t.ifError(err)
|
||||
|
||||
t.similar(stderr, /sekretz/, "password blocked on stderr")
|
||||
t.equal(stdout, "", "no output")
|
||||
t.end()
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test("config get private var (new auth)", function (t) {
|
||||
common.npm([
|
||||
"config",
|
||||
"get",
|
||||
"//registry.npmjs.org/:_password"
|
||||
],
|
||||
opts,
|
||||
function (err, code, stdout, stderr) {
|
||||
t.ifError(err)
|
||||
|
||||
t.similar(stderr, /sekretz/, "password blocked on stderr")
|
||||
t.equal(stdout, "", "no output")
|
||||
t.end()
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test("config get public var (new username)", function (t) {
|
||||
var FIXTURE_PATH = path.resolve(pkg, "fixture_npmrc")
|
||||
var s = "//registry.lvh.me/:username = wombat\n" +
|
||||
"//registry.lvh.me/:_password = YmFkIHBhc3N3b3Jk\n" +
|
||||
"//registry.lvh.me/:email = lindsay@wdu.org.au\n"
|
||||
fs.writeFileSync(FIXTURE_PATH, s, "ascii")
|
||||
fs.chmodSync(FIXTURE_PATH, "0444")
|
||||
|
||||
common.npm(
|
||||
[
|
||||
"config",
|
||||
"get",
|
||||
"//registry.lvh.me/:username",
|
||||
"--userconfig=" + FIXTURE_PATH,
|
||||
"--registry=http://registry.lvh.me/"
|
||||
],
|
||||
opts,
|
||||
function (err, code, stdout, stderr) {
|
||||
t.ifError(err)
|
||||
|
||||
t.equal(stderr, "", "stderr is empty")
|
||||
t.equal(stdout, "wombat\n", "got usename is output")
|
||||
t.end()
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test("clean", function (t) {
|
||||
rimraf.sync(pkg)
|
||||
t.end()
|
||||
})
|
Reference in New Issue
Block a user