import { act } from "@testing-library/react" ; import React from "react" ; import ReactDOM from "react-dom" ; import { BrowserRouter as Router } from "react-router-dom" ; import App from "./app" ; it ( "renders without crashing" , ( ) => { const div = document . createElement ( "div" ) ; act ( ( ) => { ReactDOM . render ( < Router > < App /> < /Router>, div); } ) ; ReactDOM . unmountComponentAtNode ( div ) ; } ) ;