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
1 changed files with 2 additions and 2 deletions

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