Skip to content

Commit 204d5fd

Browse files
author
Evgenii Perminov
committed
fix mutation tests
1 parent 2e06f7a commit 204d5fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/openapi-react-query/test/index.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ describe("client", () => {
628628
expect(error).toBeNull();
629629
});
630630

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

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

649649
const { data, error } = result.current;
650650

651-
expect(error).toBeInstanceOf(Error);
651+
expect(error).toBeNull();
652652
expect(data).toBeUndefined();
653653
});
654654

0 commit comments

Comments
 (0)