Skip to content

Commit 080346e

Browse files
committed
tests: case for overriding a built in header
closes #266
1 parent e040ec9 commit 080346e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/headers.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ describe(`request()`, () => {
1616
await request(ctx.url, `{ me { id } }`, {}, headers)
1717
expect(mock.requests[0]?.headers[headerFoo.name]).toEqual(headerFoo.value)
1818
})
19+
test(`can override built in headers`, async () => {
20+
const mock = ctx.res()
21+
await request(ctx.url, `{ me { id } }`, {}, { 'content-type': `application/json2` })
22+
expect(mock.requests[0]?.headers[`content-type`]).toEqual(`application/json2`)
23+
})
1924
})
2025

2126
describe(`using class`, () => {

0 commit comments

Comments
 (0)