about summary refs log tree commit diff
path: root/test/NavLink.test.js
blob: 8a1f1445c7591d1b1c86204ed0eec86dcabcfe2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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>`
    )
  })
})