Skip to content

Commit

Permalink
test: adjust content-type assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Jan 5, 2024
1 parent 5ecbd48 commit fe67398
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plugin/test/fixtures/v5/with-adapters/e2e-tests/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ exports.runTests = function runTests(env, host) {
expect(result).toEqual({
amIJSON: true,
})
expect(res.headers.get('content-type')).toEqual('application/json')
expect(res.headers.get('content-type')).toEqual(
'application/json; charset=utf-8',
)
})
test(`returns json correctly via send`, async () => {
const res = await fetchTwice(`${host}/api/i-am-json-too`)
Expand All @@ -126,14 +128,18 @@ exports.runTests = function runTests(env, host) {
expect(result).toEqual({
amIJSON: true,
})
expect(res.headers.get('content-type')).toEqual('application/json')
expect(res.headers.get('content-type')).toEqual(
'application/json; charset=utf-8',
)
})
test(`returns boolean correctly via send`, async () => {
const res = await fetchTwice(`${host}/api/i-am-false`)
const result = await res.json()

expect(result).toEqual(false)
expect(res.headers.get('content-type')).toEqual('application/json')
expect(res.headers.get('content-type')).toEqual(
'application/json; charset=utf-8',
)
})
test(`returns status correctly via send`, async () => {
const res = await fetchTwice(`${host}/api/i-am-status`)
Expand Down

0 comments on commit fe67398

Please sign in to comment.