commit cd1c29976806d47711a1a2eaeae213ed0fd065f2
parent 7de5cbda2d5094cd48226aa4d0d3d581fc9a6317
Author: Stujo <stujo@users.noreply.github.com>
Date: Wed, 19 Oct 2016 22:57:21 -0700
Fix Layout.test.js that was always passing (#928)
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/components/Layout/Layout.test.js b/src/components/Layout/Layout.test.js
@@ -12,22 +12,21 @@
import React from 'react';
import { expect } from 'chai';
-import { shallow } from 'enzyme';
+import { render } from 'enzyme';
import App from '../App';
import Layout from './Layout';
describe('Layout', () => {
it('renders children correctly', () => {
- const wrapper = shallow(
+ const wrapper = render(
<App context={{ insertCss: () => {} }}>
<Layout>
<div className="child" />
</Layout>
</App>
);
-
- expect(wrapper.contains(<div className="child" />)).to.be.true;
+ expect(wrapper.find('div.child').length).to.eq(1);
});
});