Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ describe('PreactQueryDevtoolsPanel', () => {

render(<PreactQueryDevtoolsPanel client={queryClient} onClose={onClose} />)

expect(setOnCloseMock).toHaveBeenCalledWith(expect.any(Function))
expect(setOnCloseMock).toHaveBeenCalledWith(onClose)
})

it('should default "onClose" to a no-op function when the prop is omitted', () => {
render(<PreactQueryDevtoolsPanel client={queryClient} />)

expect(setOnCloseMock).toHaveBeenCalledWith(expect.any(Function))
const forwarded = setOnCloseMock.mock.calls[0]?.[0]
expect(forwarded).toBeInstanceOf(Function)
expect(forwarded()).toBeUndefined()
})

it('should forward "errorTypes" to the devtools instance', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ describe('ReactQueryDevtoolsPanel', () => {

render(<ReactQueryDevtoolsPanel client={queryClient} onClose={onClose} />)

expect(setOnCloseMock).toHaveBeenCalledWith(expect.any(Function))
expect(setOnCloseMock).toHaveBeenCalledWith(onClose)
})

it('should default "onClose" to a no-op function when the prop is omitted', () => {
render(<ReactQueryDevtoolsPanel client={queryClient} />)

expect(setOnCloseMock).toHaveBeenCalledWith(expect.any(Function))
const forwarded = setOnCloseMock.mock.calls[0]?.[0]
expect(forwarded).toBeInstanceOf(Function)
expect(forwarded()).toBeUndefined()
})

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