(
props: Partial<Parameters<typeof useMutateComment>[0]>,
)
| 119 | client.getQueryData<PostCommentsData>(queryKey)?.postComments.edges; |
| 120 | |
| 121 | const editComment = async ( |
| 122 | props: Partial<Parameters<typeof useMutateComment>[0]>, |
| 123 | ) => { |
| 124 | requestMethod.mockResolvedValueOnce({ |
| 125 | comment: { id: 'reply', content: 'edited' }, |
| 126 | }); |
| 127 | const { result } = renderHook( |
| 128 | () => useMutateComment({ post, editCommentId: 'reply', ...props }), |
| 129 | { wrapper }, |
| 130 | ); |
| 131 | |
| 132 | await act(async () => { |
| 133 | await result.current.mutateComment('edited'); |
| 134 | }); |
| 135 | }; |
| 136 | |
| 137 | it('should update a reply even when its parent is not passed', async () => { |
| 138 | const onCommented = jest.fn(); |
no test coverage detected