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:
23
node_modules/npm/test/tap/referer.js
generated
vendored
Normal file
23
node_modules/npm/test/tap/referer.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
var common = require("../common-tap.js")
|
||||
var test = require("tap").test
|
||||
var http = require("http")
|
||||
|
||||
test("should send referer http header", function (t) {
|
||||
http.createServer(function (q, s) {
|
||||
t.equal(q.headers.referer, "install foo")
|
||||
s.statusCode = 404
|
||||
s.end(JSON.stringify({error: "whatever"}))
|
||||
this.close()
|
||||
}).listen(common.port, function () {
|
||||
var reg = "http://localhost:" + common.port
|
||||
var args = [ "install", "foo", "--registry", reg ]
|
||||
common.npm(args, {}, function (er, code) {
|
||||
if (er) {
|
||||
throw er
|
||||
}
|
||||
// should not have ended nicely, since we returned an error
|
||||
t.ok(code)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user