12345678910111213141516171819202122 |
- import "raf/polyfill";
- import React from "react";
- import App from "./App";
- import { configure, shallow } from "enzyme";
- import Adapter from "enzyme-adapter-react-16";
- // Configure Enzyme for the React version we're using.
- // Could be in a test setup file. Required for React 16, 15, 0.14, 0.13.
- configure({ adapter: new Adapter() });
- describe("<App />>", () => {
- it("should render App", () => {
- const wrapper = shallow(<App />, {
- // Pass a context to component.
- context: {},
- // Disable component mount lifecycle methods, as well as update after
- // setProps() and setContext().
- disableLifecycleMethods: true,
- });
- console.log(wrapper.debug());
- });
- });
|