FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
feast/ui/src/test-utils.tsx at get-historical-python-mode · feast-dev/feast · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
feast-dev
/
feast
Public
Notifications
You must be signed in to change notification settings
Fork
1.4k
Star
7.2k
Code
Issues
218
Pull requests
191
Discussions
Actions
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
feast
/
ui
/
src
/
test-utils.tsx
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (31 loc) · 1.05 KB
Breadcrumbs
feast
/
ui
/
src
/
test-utils.tsx
Copy path
File metadata and controls
37 lines (31 loc) · 1.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import
React
from
"react"
;
import
{
render
,
RenderOptions
}
from
"@testing-library/react"
;
import
{
QueryClient
,
QueryClientProvider
}
from
"react-query"
;
import
{
QueryParamProvider
}
from
"use-query-params"
;
import
{
MemoryRouter
as
Router
}
from
"react-router-dom"
;
import
RouteAdapter
from
"./hacks/RouteAdapter"
;
interface
ProvidersProps
{
children
:
React
.
ReactNode
;
}
const
queryClient
=
new
QueryClient
(
)
;
const
AllTheProviders
=
(
{
children
}
:
ProvidersProps
)
=>
{
return
(
<
QueryClientProvider
client
=
{
queryClient
}
>
<
Router
initialEntries
=
{
[
"/"
]
}
>
<
QueryParamProvider
ReactRouterRoute
=
{
RouteAdapter
as
unknown
as
React
.
FunctionComponent
}
>
{
children
}
</
QueryParamProvider
>
</
Router
>
</
QueryClientProvider
>
)
;
}
;
const
customRender
=
(
ui
:
React
.
ReactElement
,
options
?:
Omit
<
RenderOptions
,
'wrapper'
>
)
=>
render
(
ui
,
{
wrapper
:
AllTheProviders
,
...
options
}
)
;
// re-export everything
export
*
from
"@testing-library/react"
;
// override render method
export
{
customRender
as
render
}
;
Back
|
FazBrowse Home
|
New Git URL