Project

General

Profile

« Previous | Next » 

Revision 32a4050a

Added by Dan Seethaler over 6 years ago

Fixes #21179 - Upgrade to

Enzyme needs to be upgraded to support react@16. In upgrading I
found that using jest's snapshot feature would greatly improve
several of the tests that were in place. I've changed these
tests to use snapshots and added enzyme-to-json to support
snapshot testing with enzyme wrappers.

http://projects.theforeman.org/issues/21179

View differences:

webpack/assets/javascripts/react_app/components/common/Icon/Icon.test.js
// Configure Enzyme
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15';
configure({ adapter: new Adapter() });
jest.unmock('./');
import React from 'react';

Also available in: Unified diff