Files
coder/site/components/Icons/index.test.tsx
Bryan 7b9347bce6 chore: Add linter for typescript code (#45)
- Add and configure `eslint`
- Add to build pipeline
- Fix lint failures
2022-01-20 22:00:14 -08:00

23 lines
502 B
TypeScript

import React from "react"
import SvgIcon from "@material-ui/core/SvgIcon"
import { render } from "./../../test_helpers"
import * as Icons from "./index"
const getAllIcons = (): [string, typeof SvgIcon][] => {
let k: keyof typeof Icons
const ret: [string, typeof SvgIcon][] = []
for (k in Icons) {
ret.push([k, Icons[k]])
}
return ret
}
describe("Icons", () => {
const allIcons = getAllIcons()
it.each(allIcons)(`rendering icon %p`, (_name, Icon) => {
render(<Icon />)
})
})