improved test coverage (#1222)

This commit is contained in:
Alexander Mykolaichuk
2020-06-08 09:42:59 +02:00
committed by delvedor
parent 93cf8aa3c0
commit fd59d66076

View File

@ -900,3 +900,18 @@ test('Abort a request asyncronously', t => {
setImmediate(() => request.abort()) setImmediate(() => request.abort())
}) })
}) })
test('Should correctly resolve request pathname', t => {
t.plan(1)
const connection = new Connection({
url: new URL(`http://localhost:80/test`)
})
t.strictEqual(
connection.buildRequestObject({
path: 'hello'
}).pathname,
'/test/hello'
)
})