fix: use two words component

This commit is contained in:
Anthony Fu committed 2022-11-30 08:10:46 +08:00
1 parent 82ca803748
commit 85081134f0
8 files changed
+10 -9

No files matched your search

+4 -4
View File
@@ -1,16 +1,16 @@
import { mount } from '@vue/test-utils'
import { describe, expect, it } from 'vitest'
import Counter from '../src/components/Counter.vue'
import TheCounter from '../src/components/TheCounter.vue'
describe('Counter.vue', () => {
describe('TheCounter.vue', () => {
it('should render', () => {
const wrapper = mount(Counter, { props: { initial: 10 } })
const wrapper = mount(TheCounter, { props: { initial: 10 } })
expect(wrapper.text()).toContain('10')
expect(wrapper.html()).toMatchSnapshot()
})
it('should be interactive', async () => {
const wrapper = mount(Counter, { props: { initial: 0 } })
const wrapper = mount(TheCounter, { props: { initial: 0 } })
expect(wrapper.text()).toContain('0')
expect(wrapper.find('.inc').exists()).toBe(true)