about summary refs log tree commit diff
path: root/test/NavLink.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/NavLink.test.js')
-rw-r--r--test/NavLink.test.js12
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()
+  })
 })