Skip to content

Commit

Permalink
Remove 'react-test-renderer' and snapshot tests – not compatible with…
Browse files Browse the repository at this point in the history
… 'react-dom' loaded by 'enzyme'.

See facebook/react#7386 for more info
  • Loading branch information
Mathew Hawley committed Sep 30, 2016
1 parent b75213a commit 7f6bb7d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"ncp": "^2.0.0",
"pre-commit": "^1.1.3",
"react-addons-test-utils": "^15.3.2",
"react-test-renderer": "^15.3.2",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.16.1"
},
Expand Down
13 changes: 6 additions & 7 deletions src/components/App/App.spec.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/* eslint-env jest */

import React from 'react';
import renderer from 'react-test-renderer';
import { shallow } from 'enzyme';

import { App } from './App';

describe('<App />', () => {
describe('Snapshots', () => {
it('should render as expected', () => {
const component = renderer.create(<App />);
const tree = component.toJSON();
describe('Shallow Rendering', () => {
it('should render an <h1>', () => {
const wrapper = shallow(<App />);

expect(
tree
).toMatchSnapshot();
wrapper.contains(<h1>Hello, world</h1>)
).toBeTruthy();
});
});
});
5 changes: 0 additions & 5 deletions src/components/App/__snapshots__/App.spec.js.snap

This file was deleted.

0 comments on commit 7f6bb7d

Please sign in to comment.