I'm reviewing the Alert component from 30 Seconds of Code: React. It works just fine.
I wrote a test but the test fails with the error. Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null
https://codesandbox.io/s/goofy-curie-zh2bo
test("renders an alert", () => {
const { getByTestId } = render(<Alert />);
expect(getByTestId("alert")).toBeInTheDocument();
});
Any help is appreciated.