Skip to content

Commit 7f947b9

Browse files
authored
test(solid-query-devtools/devtools): restore forwarding cases for 'buttonPosition' and 'position' props (#10824)
1 parent 7c3e028 commit 7f947b9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,29 @@ describe('SolidQueryDevtools', () => {
3535
).not.toThrow()
3636
})
3737

38+
it('should forward "buttonPosition" to the devtools instance', () => {
39+
const setButtonPosition = vi.spyOn(
40+
TanstackQueryDevtools.prototype,
41+
'setButtonPosition',
42+
)
43+
const queryClient = new QueryClient()
44+
45+
render(() => (
46+
<SolidQueryDevtools client={queryClient} buttonPosition="top-left" />
47+
))
48+
49+
expect(setButtonPosition).toHaveBeenCalledWith('top-left')
50+
})
51+
52+
it('should forward "position" to the devtools instance', () => {
53+
const setPosition = vi.spyOn(TanstackQueryDevtools.prototype, 'setPosition')
54+
const queryClient = new QueryClient()
55+
56+
render(() => <SolidQueryDevtools client={queryClient} position="left" />)
57+
58+
expect(setPosition).toHaveBeenCalledWith('left')
59+
})
60+
3861
it('should forward "initialIsOpen" to the devtools instance', () => {
3962
const setInitialIsOpen = vi.spyOn(
4063
TanstackQueryDevtools.prototype,

0 commit comments

Comments
 (0)