diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-08-30 22:31:54 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-08-30 22:31:54 +0200 |
commit | 51b96f0c0bc9e00477e24d1d799dba0e3a519f24 (patch) | |
tree | 59fbd931207ba86976418cea57c928beee2e31cc /test/NavLink.test.js | |
parent | f0d5b38eb23e85e993bf040f7e84c5b6b16d7566 (diff) | |
download | puszcza-51b96f0c0bc9e00477e24d1d799dba0e3a519f24.tar.gz puszcza-51b96f0c0bc9e00477e24d1d799dba0e3a519f24.zip |
Add NavBar test
Diffstat (limited to 'test/NavLink.test.js')
-rw-r--r-- | test/NavLink.test.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/NavLink.test.js b/test/NavLink.test.js index 8a1f144..aeb16d0 100644 --- a/test/NavLink.test.js +++ b/test/NavLink.test.js @@ -1,9 +1,9 @@ -import { mount } from '@vue/test-utils' +import { shallowMount } from '@vue/test-utils' import NavLink from '../components/NavLink' describe('NavLink', () => { // Now mount the component and you have the wrapper - const wrapper = mount(NavLink) + const wrapper = shallowMount(NavLink) wrapper.setProps({ link: '/link', name: 'Link' }) @@ -12,4 +12,12 @@ describe('NavLink', () => { `<li class="navlink"><nuxt-link class="link" to="/link">Link</nuxt-link></li>` ) }) + + it('check text', () => { + expect(wrapper.text()).toBe('Link') + }) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) }) |