From 8bf613a42a13c7bff643005ef1fcdbee3c369539 Mon Sep 17 00:00:00 2001 From: xidedix Date: Thu, 19 Apr 2018 17:11:07 +0200 Subject: [PATCH] tests: more coverage --- tests/Aside.test.js | 16 +++++++-- tests/Footer.test.js | 10 ++++-- tests/Header.test.js | 10 ++++-- tests/NavbarBrand.test.js | 9 +++++ tests/Sidebar.test.js | 7 +++- tests/SidebarFooter.test.js | 6 +++- tests/SidebarForm.test.js | 6 +++- tests/SidebarHeader.test.js | 6 +++- tests/Switch.test.js | 68 +++++++++++++++++++++++++++++++------ 9 files changed, 116 insertions(+), 22 deletions(-) diff --git a/tests/Aside.test.js b/tests/Aside.test.js index 17ae37ef..15e32696 100644 --- a/tests/Aside.test.js +++ b/tests/Aside.test.js @@ -2,7 +2,7 @@ import expect from 'expect' import React from 'react' import {renderToStaticMarkup as render} from 'react-dom/server' -import { configure, mount } from 'enzyme' +import { configure, mount, shallow } from 'enzyme' import Adapter from 'enzyme-adapter-react-16' import { spy } from 'sinon' @@ -12,7 +12,7 @@ configure({ adapter: new Adapter() }); describe('AppAside', () => { it('renders aside with class="aside-menu"', () => { - expect(render()) + expect(render()) .toContain('') }); it('calls componentDidMount', () => { @@ -21,4 +21,14 @@ describe('AppAside', () => { const wrapper = mount(