Skip to content

Commit

Permalink
fix mutation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgenii Perminov committed Nov 11, 2024
1 parent 2e06f7a commit 204d5fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/openapi-react-query/test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ describe("client", () => {
expect(error).toBeNull();
});

it("should resolve error properly and have undefined data when mutationFn returns undefined", async () => {
it("should resolve data properly and have error as null when mutationFn returns undefined", async () => {
const fetchClient = createFetchClient<paths>({ baseUrl });
const client = createClient(fetchClient);

Expand All @@ -648,7 +648,7 @@ describe("client", () => {

const { data, error } = result.current;

expect(error).toBeInstanceOf(Error);
expect(error).toBeNull();
expect(data).toBeUndefined();
});

Expand Down

0 comments on commit 204d5fd

Please sign in to comment.