MCPcopy Create free account
hub / github.com/dailydotdev/apps / zodError

Function zodError

packages/shared/src/hooks/useUserExperienceForm.spec.tsx:579–593  ·  view source on GitHub ↗
(
      issues: { path: (string | number)[]; message: string }[],
    )

Source from the content-addressed store, hash-verified

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(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected