node_modules: update

This commit is contained in:
Dawid Dziurla 2020-11-12 16:37:43 +01:00
parent 4a21c51f2f
commit b91baffed3
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B
107 changed files with 3886 additions and 2943 deletions

View file

@ -158,6 +158,25 @@ test('req.id has a non-function value with custom id function', function (t) {
}
})
test('req.url will be obtained from input request req.path when input request url is an object', function (t) {
t.plan(1)
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
req.path = '/test'
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/test')
res.end()
}
})
test('req.url will be obtained from input request url.path when input request url is an object', function (t) {
t.plan(1)
@ -170,13 +189,50 @@ test('req.url will be obtained from input request url.path when input request ur
t.tearDown(() => server.close())
function handler (req, res) {
req.url = {path: '/test'}
req.url = { path: '/test' }
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/test')
res.end()
}
})
test('req.url will be obtained from input request url when input request url is not an object', function (t) {
t.plan(1)
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
req.url = '/test'
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/test')
res.end()
}
})
test('req.url will be empty when input request path and url are not defined', function (t) {
t.plan(1)
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/')
res.end()
}
})
test('req.url will be obtained from input request originalUrl when available', function (t) {
t.plan(1)