Refactor to external scraper and update dependencies (#113)

This commit is contained in:
David
2022-06-15 23:37:15 +02:00
committed by GitHub
parent ff1ad202ae
commit 274e7f1a4b
49 changed files with 6952 additions and 4414 deletions

View File

@@ -1,8 +1,9 @@
import { FC, ReactElement } from "react";
import { FC, ReactElement, PropsWithChildren } from "react";
import { render, RenderOptions } from "@testing-library/react";
import { ChakraProvider } from "@chakra-ui/react";
import theme from "@theme";
import { Layout } from "@components";
import { RouterProviderMock } from "@mocks/next";
// Jest JSDOM bug
Object.defineProperty(window, 'matchMedia', {
@@ -19,12 +20,14 @@ Object.defineProperty(window, 'matchMedia', {
})),
});
const Providers: FC = ({ children }) => (
<ChakraProvider theme={theme}>
<Layout>
{children}
</Layout>
</ChakraProvider>
const Providers: FC<PropsWithChildren> = ({ children }) => (
<RouterProviderMock>
<ChakraProvider theme={theme}>
<Layout>
{children}
</Layout>
</ChakraProvider>
</RouterProviderMock>
);
const customRender = (