1
0
Fork 0
mirror of synced 2024-08-23 05:51:29 +12:00

Updating test case to cover this scenario properly.

This commit is contained in:
mike12345567 2024-05-08 16:12:24 +01:00
parent fd94e3aea9
commit ed1f9f19a7

View file

@ -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)
}