diff options
Diffstat (limited to 'frontend/src/tests/render.tsx')
-rw-r--r-- | frontend/src/tests/render.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/src/tests/render.tsx b/frontend/src/tests/render.tsx new file mode 100644 index 000000000..e0031e903 --- /dev/null +++ b/frontend/src/tests/render.tsx @@ -0,0 +1,17 @@ +import { FunctionComponent } from "react"; +import { render } from "."; + +export interface RenderTestCase { + name: string; + ui: FunctionComponent; +} + +export function renderTest(name: string, cases: RenderTestCase[]) { + describe(name, () => { + cases.forEach((element) => { + it(`${element.name.toLowerCase()} should render`, () => { + render(<element.ui />); + }); + }); + }); +} |