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.js15
1 files changed, 15 insertions, 0 deletions
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(
+      `<li class="navlink"><nuxt-link class="link" to="/link">Link</nuxt-link></li>`
+    )
+  })
+})