Skip to content
Myr

test(validator): compatibility with Node.js `v20.13.1` (#2682)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by GitHub · parent 753fcb4 · Browse files · 1 file+4 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−7 removed

  • tests:+4 added−7 removed

1 file+4 added−7 removed

modified:src/validator/validator.test.ts+4 added-7 removed
165 unmodified lines
166 })167 expect(res.status).toBe(400)168 const data = await res.json()169 expect(data['success']).toBe(false)170 expect(data['message']).toMatch(171 /Malformed FormData request. \_*Response.formData: Could not parse content as FormData./172 )170 expect(data['message']).toMatch(/^Malformed FormData request./)171 })172173 it('Should return 400 response, for malformed content type header', async () => {174 const res = await app.request('http://localhost/post', {
3 unmodified lines
178 'content-type': 'multipart/form-data',179 },180 })181 expect(res.status).toBe(400)184 expect(await res.json()).toEqual({185 success: false,186 message: 'Malformed FormData request. Error: Multipart: Boundary not found',187 })182 const data = await res.json()183 expect(data['success']).toBe(false)184 expect(data['message']).toMatch(/^Malformed FormData request./)185 })186})187188describe('Cached contents', () => {
837 unmodified lines