Skip to content

Commit

Permalink
tests: case for overriding a built in header
Browse files Browse the repository at this point in the history
closes #266
  • Loading branch information
jasonkuhrt committed Feb 17, 2024
1 parent e040ec9 commit 080346e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/headers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ describe(`request()`, () => {
await request(ctx.url, `{ me { id } }`, {}, headers)
expect(mock.requests[0]?.headers[headerFoo.name]).toEqual(headerFoo.value)
})
test(`can override built in headers`, async () => {
const mock = ctx.res()
await request(ctx.url, `{ me { id } }`, {}, { 'content-type': `application/json2` })
expect(mock.requests[0]?.headers[`content-type`]).toEqual(`application/json2`)
})
})

describe(`using class`, () => {
Expand Down

0 comments on commit 080346e

Please sign in to comment.