Add enzyme for testing

Change-Id: If64eba12b5c255e4d0143eab009499793674778a
This commit is contained in:
Manuel Stahl
2020-02-08 13:14:12 +01:00
parent ac9400d891
commit a854f981c6
4 changed files with 268 additions and 12 deletions

14
src/App.test.js Normal file
View File

@@ -0,0 +1,14 @@
import React from "react";
import { TestContext } from "react-admin";
import { shallow } from "enzyme";
import App from "./App";
describe("App", () => {
it("renders", () => {
shallow(
<TestContext>
<App />
</TestContext>
);
});
});

4
src/setupTests.js Normal file
View File

@@ -0,0 +1,4 @@
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";
configure({ adapter: new Adapter() });