Skip to content

Commit bb68fa0

Browse files
authored
test(solid-query-devtools/devtoolsPanel): assert the default 'onClose' is a no-op instead of 'expect.any(Function)' (#11030)
1 parent c476781 commit bb68fa0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/solid-query-devtools/src/__tests__/devtoolsPanel.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ describe('SolidQueryDevtoolsPanel', () => {
5858
)
5959
render(() => <SolidQueryDevtoolsPanel client={queryClient} />)
6060

61-
expect(setOnClose).toHaveBeenCalledWith(expect.any(Function))
61+
const forwarded = setOnClose.mock.calls[0]![0]
62+
expect(forwarded).toBeInstanceOf(Function)
63+
expect(forwarded()).toBeUndefined()
6264
})
6365

6466
it('should forward "errorTypes" to the devtools instance', () => {

0 commit comments

Comments
 (0)