Add enzyme for testing
Change-Id: If64eba12b5c255e4d0143eab009499793674778a
This commit is contained in:
14
src/App.test.js
Normal file
14
src/App.test.js
Normal 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
4
src/setupTests.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import { configure } from "enzyme";
|
||||
import Adapter from "enzyme-adapter-react-16";
|
||||
|
||||
configure({ adapter: new Adapter() });
|
Reference in New Issue
Block a user