|
@@ -3,6 +3,7 @@ import React from "react";
|
|
|
import { App, appName, titleName } from "./App";
|
|
|
import { configure, shallow, mount } from "enzyme";
|
|
|
import Adapter from "enzyme-adapter-react-16";
|
|
|
+import toJson from 'enzyme-to-json';
|
|
|
|
|
|
|
|
|
|
|
@@ -40,4 +41,9 @@ describe("<App />>", () => {
|
|
|
expect(w.find(appName).length).toBe(1);
|
|
|
expect(w.find(titleName).length).toBe(1);
|
|
|
});
|
|
|
+
|
|
|
+ it("matches the snapshot", () => {
|
|
|
+ const tree = shallow(<App />);
|
|
|
+ expect(toJson(tree)).toMatchSnapshot();
|
|
|
+ });
|
|
|
});
|