Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/validator/validator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ describe('Malformed FormData request', () => {
expect(res.status).toBe(400)
const data = await res.json()
expect(data['success']).toBe(false)
expect(data['message']).toMatch(
/Malformed FormData request. \_*Response.formData: Could not parse content as FormData./
)
expect(data['message']).toMatch(/^Malformed FormData request./)
})

it('Should return 400 response, for malformed content type header', async () => {
Expand All @@ -181,10 +179,9 @@ describe('Malformed FormData request', () => {
},
})
expect(res.status).toBe(400)
expect(await res.json()).toEqual({
success: false,
message: 'Malformed FormData request. Error: Multipart: Boundary not found',
})
const data = await res.json()
expect(data['success']).toBe(false)
expect(data['message']).toMatch(/^Malformed FormData request./)
})
})

Expand Down