MCPcopy Create free account
hub / github.com/TanStack/query / renderExplorer

Function renderExplorer

packages/query-devtools/src/__tests__/Explorer.test.tsx:31–50  ·  view source on GitHub ↗
(
    props: Parameters<typeof Explorer>[0],
    options: { theme?: 'dark' | 'light' } = {},
  )

Source from the content-addressed store, hash-verified

29 })
30
31 function renderExplorer(
32 props: Parameters<typeof Explorer>[0],
33 options: { theme?: 'dark' | 'light' } = {},
34 ) {
35 const theme = options.theme ?? 'dark'
36 return render(() => (
37 <QueryDevtoolsContext.Provider
38 value={{
39 client: queryClient,
40 queryFlavor: 'TanStack Query',
41 version: '5',
42 onlineManager,
43 }}
44 >
45 <ThemeContext.Provider value={() => theme}>
46 <Explorer {...props} />
47 </ThemeContext.Provider>
48 </QueryDevtoolsContext.Provider>
49 ))
50 }
51
52 describe('primitive values', () => {
53 it('should render a "label: value" row for a string value', () => {

Callers 1

Explorer.test.tsxFile · 0.85

Calls 1

renderFunction · 0.85

Tested by

no test coverage detected