Skip to content

Commit b8eadfe

Browse files
committed
test(useDataConnectMutation): assert inserted data
1 parent f07c638 commit b8eadfe

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/react/src/data-connect/useDataConnectMutation.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ describe("useDataConnectMutation", () => {
8787
expect(result.current.data).toHaveProperty("source");
8888
expect(result.current.data).toHaveProperty("fetchTime");
8989
expect(result.current.data).toHaveProperty("movie_insert");
90+
expect(result.current.data?.ref.variables).toMatchObject(movie);
9091
});
9192
});
9293

packages/react/src/data-connect/useDataConnectMutation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export function useDataConnectMutation<
7878
options?.onSuccess?.(...args);
7979
},
8080
mutationFn: async (variables) => {
81+
console.log('check', typeof ref)
8182
const mutationRef = typeof ref === "function" ? ref(variables) : ref;
8283
const response = await executeMutation<Data, Variables>(mutationRef);
8384

0 commit comments

Comments
 (0)