mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
- Adds initial infra for running front-end tests (`jest`, `ts-jest`, `jest.config.js`, etc) - Adds codecov integration front-end code
14 lines
478 B
TypeScript
14 lines
478 B
TypeScript
import { render as wrappedRender, RenderResult } from "@testing-library/react"
|
|
import React from "react"
|
|
import ThemeProvider from "@material-ui/styles/ThemeProvider"
|
|
|
|
import { dark } from "../theme"
|
|
|
|
export const WrapperComponent: React.FC = ({ children }) => {
|
|
return <ThemeProvider theme={dark}>{children}</ThemeProvider>
|
|
}
|
|
|
|
export const render = (component: React.ReactElement): RenderResult => {
|
|
return wrappedRender(<WrapperComponent>{component}</WrapperComponent>)
|
|
}
|