(
issues: { path: (string | number)[]; message: string }[],
)
| 577 | |
| 578 | describe('server validation errors', () => { |
| 579 | const zodError = ( |
| 580 | issues: { path: (string | number)[]; message: string }[], |
| 581 | ) => ({ |
| 582 | response: { |
| 583 | errors: [ |
| 584 | { |
| 585 | message: 'Validation error', |
| 586 | extensions: { |
| 587 | code: ApiError.ZodValidationError, |
| 588 | issues: issues.map((issue) => ({ ...issue, code: 'too_big' })), |
| 589 | }, |
| 590 | }, |
| 591 | ], |
| 592 | }, |
| 593 | }); |
| 594 | |
| 595 | it('should surface a rejected skills array on the form and as a toast', async () => { |
| 596 | (upsertUserWorkExperience as jest.Mock).mockRejectedValue( |
no outgoing calls
no test coverage detected