fix: use two words component name

This commit is contained in:
Anthony Fu committed 2022-11-30 08:05:45 +08:00
1 parent 2e425e13bd
commit 01e0cbbb82
10 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
// Vitest Snapshot v1
exports[`Counter.vue > should render 1`] = `"<div>10 <button class=\\"inc\\"> + </button><button class=\\"dec\\"> - </button></div>"`;
exports[`TheCounter.vue > should render 1`] = `"<div>10 <button class=\\"inc\\"> + </button><button class=\\"dec\\"> - </button></div>"`;
+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)