From 021b6e975f6a263b96074502cabe4baf0eb6f875 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 30 Aug 2019 10:36:23 +0200 Subject: Add testing --- test/NavLink.test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/NavLink.test.js (limited to 'test/NavLink.test.js') diff --git a/test/NavLink.test.js b/test/NavLink.test.js new file mode 100644 index 0000000..8a1f144 --- /dev/null +++ b/test/NavLink.test.js @@ -0,0 +1,15 @@ +import { mount } from '@vue/test-utils' +import NavLink from '../components/NavLink' + +describe('NavLink', () => { + // Now mount the component and you have the wrapper + const wrapper = mount(NavLink) + + wrapper.setProps({ link: '/link', name: 'Link' }) + + it('renders the correct markup', () => { + expect(wrapper.html()).toContain( + `` + ) + }) +}) -- cgit 1.4.1