Skip to content

Instantly share code, notes, and snippets.

@eddyerburgh
Last active September 30, 2018 04:51
Show Gist options
  • Save eddyerburgh/cf3217cf980c76da6485d52508b77bd7 to your computer and use it in GitHub Desktop.
Save eddyerburgh/cf3217cf980c76da6485d52508b77bd7 to your computer and use it in GitHub Desktop.
import test from 'tape'
import { shallow } from '@vue/test-utils'
import List from '../../src/components/List'
test('List.vue renders a <li> for each item in props.items', t => {
t.plan(1)
const items = ['', '']
const wrapper = shallow(List, {
propsData: { items }
})
const msg = 'li length matches items.length'
t.equal(wrapper.findAll('li').length, items.length, msg)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment