We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5c6df7 commit 3f10705Copy full SHA for 3f10705
1 file changed
packages/query-devtools/src/__tests__/Devtools.test.tsx
@@ -339,6 +339,22 @@ describe('Devtools', () => {
339
rendered.getByLabelText(/Mutation submitted at/),
340
).toBeInTheDocument()
341
})
342
+
343
+ it('should render an idle mutation that has been built but not executed', async () => {
344
+ const rendered = renderDevtools({ initialIsOpen: true })
345
346
+ fireEvent.click(rendered.getByText('Mutations'))
347
348
+ queryClient.getMutationCache().build(queryClient, {
349
+ mutationKey: ['idle-mut'],
350
+ mutationFn: () => Promise.resolve('ok'),
351
+ })
352
+ await vi.advanceTimersByTimeAsync(0)
353
354
+ expect(
355
+ rendered.getByLabelText(/Mutation submitted at/),
356
+ ).toBeInTheDocument()
357
358
359
360
describe('disabled and static queries', () => {
0 commit comments