Last active
September 30, 2018 04:51
-
-
Save eddyerburgh/cf3217cf980c76da6485d52508b77bd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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