Skip to content

Instantly share code, notes, and snippets.

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