App.test.js 698 B

12345678910111213141516171819202122
  1. import "raf/polyfill";
  2. import React from "react";
  3. import App from "./App";
  4. import { configure, shallow } from "enzyme";
  5. import Adapter from "enzyme-adapter-react-16";
  6. // Configure Enzyme for the React version we're using.
  7. // Could be in a test setup file. Required for React 16, 15, 0.14, 0.13.
  8. configure({ adapter: new Adapter() });
  9. describe("<App />>", () => {
  10. it("should render App", () => {
  11. const wrapper = shallow(<App />, {
  12. // Pass a context to component.
  13. context: {},
  14. // Disable component mount lifecycle methods, as well as update after
  15. // setProps() and setContext().
  16. disableLifecycleMethods: true,
  17. });
  18. console.log(wrapper.debug());
  19. });
  20. });