authelia/web/src/components/TimerIcon.test.tsx
Amir Zarrinkafsh 1b06e46f71
test(web): drop enzyme in favor of react-testing-library (#2224)
* test(web): drop enzyme in favor of react-testing-library

Enzyme is falling behind in maintenance, it is currently maintained by one primary developer and still does [not support React 17](https://github.com/enzymejs/enzyme/pull/2430) despite it being released in October 2020.

[react-testing-library (RTL)](https://testing-library.com/docs) is [recommended by Facebook](https://reactjs.org/docs/test-utils.html#overview) and encourages writing tests that avoid testing implementation details.

* build(deps): update react monorepo to v17 (major)

* build(deps): remove @types/{enzyme,jest}
2021-08-03 16:25:13 +10:00

10 lines
231 B
TypeScript

import React from "react";
import { render } from "@testing-library/react";
import TimerIcon from "@components/TimerIcon";
it("renders without crashing", () => {
render(<TimerIcon width={32} height={32} period={30} />);
});