Skip to content

Commit fe67398

Browse files
committed
test: adjust content-type assertions
1 parent 5ecbd48 commit fe67398

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

plugin/test/fixtures/v5/with-adapters/e2e-tests/test-helpers.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ exports.runTests = function runTests(env, host) {
117117
expect(result).toEqual({
118118
amIJSON: true,
119119
})
120-
expect(res.headers.get('content-type')).toEqual('application/json')
120+
expect(res.headers.get('content-type')).toEqual(
121+
'application/json; charset=utf-8',
122+
)
121123
})
122124
test(`returns json correctly via send`, async () => {
123125
const res = await fetchTwice(`${host}/api/i-am-json-too`)
@@ -126,14 +128,18 @@ exports.runTests = function runTests(env, host) {
126128
expect(result).toEqual({
127129
amIJSON: true,
128130
})
129-
expect(res.headers.get('content-type')).toEqual('application/json')
131+
expect(res.headers.get('content-type')).toEqual(
132+
'application/json; charset=utf-8',
133+
)
130134
})
131135
test(`returns boolean correctly via send`, async () => {
132136
const res = await fetchTwice(`${host}/api/i-am-false`)
133137
const result = await res.json()
134138

135139
expect(result).toEqual(false)
136-
expect(res.headers.get('content-type')).toEqual('application/json')
140+
expect(res.headers.get('content-type')).toEqual(
141+
'application/json; charset=utf-8',
142+
)
137143
})
138144
test(`returns status correctly via send`, async () => {
139145
const res = await fetchTwice(`${host}/api/i-am-status`)

0 commit comments

Comments
 (0)