improved test coverage (#1222)
This commit is contained in:
committed by
delvedor
parent
93cf8aa3c0
commit
fd59d66076
@ -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'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user