📜  不变式失败,您不应该在路由器测试之外使用链接 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:25.539000             🧑  作者: Mango

代码示例1
import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import App from "./App";

it("renders without crashing", () => {
  const div = document.createElement("div");
  ReactDOM.render(

  
,
div
  );
  ReactDOM.unmountComponentAtNode(div);
})