Replace enzyme with testing-library/react
Enzyme is not compatible with react 17. Change-Id: If9bca2c482bfe10a18d2ee2bc213dab966849b5b
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import { shallow } from "enzyme";
|
||||
import { render } from "@testing-library/react";
|
||||
import App from "./App";
|
||||
|
||||
describe("App", () => {
|
||||
it("renders", () => {
|
||||
shallow(<App />);
|
||||
render(<App />);
|
||||
});
|
||||
});
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import React from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import { TestContext } from "ra-test";
|
||||
import { shallow } from "enzyme";
|
||||
import LoginPage from "./LoginPage";
|
||||
|
||||
describe("LoginForm", () => {
|
||||
it("renders", () => {
|
||||
shallow(
|
||||
render(
|
||||
<TestContext>
|
||||
<LoginPage />
|
||||
</TestContext>
|
||||
|
@@ -1,6 +1,3 @@
|
||||
import { configure } from "enzyme";
|
||||
import Adapter from "enzyme-adapter-react-16";
|
||||
import fetchMock from "jest-fetch-mock";
|
||||
|
||||
configure({ adapter: new Adapter() });
|
||||
fetchMock.enableMocks();
|
||||
|
Reference in New Issue
Block a user