Updating test case to cover this scenario properly.
This commit is contained in:
parent
fd94e3aea9
commit
ed1f9f19a7
1 changed files with 2 additions and 2 deletions
|
@ -245,13 +245,13 @@ describe("REST Integration", () => {
|
|||
expect(output.extra.headers["content-type"]).toEqual("application/xml")
|
||||
})
|
||||
|
||||
test.each(contentTypes)(
|
||||
test.each([...contentTypes, undefined])(
|
||||
"should not throw an error on 204 no content",
|
||||
async contentType => {
|
||||
const input = buildInput(undefined, null, contentType, 204)
|
||||
const output = await config.integration.parseResponse(input)
|
||||
expect(output.data).toEqual([])
|
||||
expect(output.extra.raw).toEqual([])
|
||||
expect(output.extra.raw).toEqual("")
|
||||
expect(output.info.code).toEqual(204)
|
||||
expect(output.extra.headers["content-type"]).toEqual(contentType)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue