mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-25 14:45:54 -05:00
FIX tests
Signed-off-by: Damian Krysta <damian@krysta.dev>
This commit is contained in:
parent
56918bf5c2
commit
3240c20eae
6
ui/package-lock.json
generated
6
ui/package-lock.json
generated
@ -5059,9 +5059,9 @@
|
||||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001245",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz",
|
||||
"integrity": "sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA=="
|
||||
"version": "1.0.30001304",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001304.tgz",
|
||||
"integrity": "sha512-bdsfZd6K6ap87AGqSHJP/s1V+U6Z5lyrcbBu3ovbCCf8cSYpwTtGrCBObMpJqwxfTbLW6YTIdbb1jEeTelcpYQ=="
|
||||
},
|
||||
"capture-exit": {
|
||||
"version": "2.0.0",
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import { createTheme, ThemeProvider } from "@mui/material/styles";
|
||||
import { render } from "@testing-library/react";
|
||||
import { MemoryRouter } from "react-router-dom";
|
||||
import { SnackbarProvider } from "./snackbars";
|
||||
|
||||
export function renderWithCtx(
|
||||
@ -12,7 +13,11 @@ export function renderWithCtx(
|
||||
function wrapped(children: React.ReactElement): React.ReactElement {
|
||||
return (
|
||||
<ThemeProvider theme={createTheme()}>
|
||||
<SnackbarProvider autoHideDuration={5000}>{children}</SnackbarProvider>
|
||||
<SnackbarProvider autoHideDuration={5000}>
|
||||
<MemoryRouter>
|
||||
{children}
|
||||
</MemoryRouter>
|
||||
</SnackbarProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user