Skip to content

Instantly share code, notes, and snippets.

View lex111's full-sized avatar
🇺🇦
Stand with Ukraine

Alexey Pyltsyn lex111

🇺🇦
Stand with Ukraine
View GitHub Profile
import { shallowMount } 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 = shallowMount(List, {
propsData: { items }
})
expect(wrapper.findAll('li')).toHaveLength(items.length)
import { shallowMount } from '@vue/test-utils'
import { createRenderer } from 'vue-server-renderer'
import List from '@/components/List.vue'
describe('List.vue', () => {
it('renders li for each item in props.items', () => {
const items = ['', '']
const wrapper = shallowMount(List, {
propsData: { items }
})