Your browser is outdated and some Useme features may not work correctly. Update your browser.

Problem with Is in React app with Next.js

Employer
SomethingGreenOnline
SomethingGreenOnline
Description

I am trying to test one form that uses:

import { useForm, Controller } from "react-hook-form";

import { zodResolver } from "@hookform/resolvers/zod";

I have a problem in creating a test. When I click Submit => fireEvent.click(screen.getByText("Submit"))

I get the error "TypeError: Cannot read properties of undefined (reading 'length')" error related to zod.

I need help writing 1 test that checks if the data is sending correctly.

e.g. using:

expect(mockUpdateUser).toHaveBeenCalled();

and

expect(mockUpdateUser).toHaveBeenCalledWith({first_name: "xxx", etc});

Help with desktop sharing, zoom, google meets, etc.

Published
on 2023-06-14
Skills

Offers sent (4)

Budget
Negotiable
Copyright
-
Expires in
30 days