mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
feat(test): add Btn component tests
This commit is contained in:
parent
53856657f3
commit
b8560825a9
2 changed files with 18 additions and 0 deletions
15
resources/assets/js/components/ui/Btn.spec.ts
Normal file
15
resources/assets/js/components/ui/Btn.spec.ts
Normal 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()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
// Vitest Snapshot v1
|
||||||
|
|
||||||
|
exports[`renders 1`] = `"<button type=\\"button\\" data-v-27deb898=\\"\\">Click Me Nao</button>"`;
|
Loading…
Reference in a new issue