feat(test): add Btn component tests

This commit is contained in:
Phan An 2022-05-11 09:51:30 +02:00
parent 53856657f3
commit b8560825a9
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,15 @@
import { expect, it } from 'vitest'
import ComponentTestCase from '@/__tests__/ComponentTestCase'
import Btn from './Btn.vue'
new class extends ComponentTestCase {
protected test () {
it('renders', () => {
expect(this.render(Btn, {
slots: {
default: 'Click Me Nao'
}
}).html()).toMatchSnapshot()
})
}
}

View file

@ -0,0 +1,3 @@
// Vitest Snapshot v1
exports[`renders 1`] = `"<button type=\\"button\\" data-v-27deb898=\\"\\">Click Me Nao</button>"`;