mirror of
https://github.com/koel/koel
synced 2024-12-21 01:53:11 +00:00
24 lines
578 B
TypeScript
24 lines
578 B
TypeScript
import { expect, it } from 'vitest'
|
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
|
import BtnGroup from './BtnGroup.vue'
|
|
import Btn from './Btn.vue'
|
|
|
|
new class extends UnitTestCase {
|
|
private renderButtonToSlot (text: string) {
|
|
return this.render(Btn, {
|
|
slots: {
|
|
default: text
|
|
}
|
|
}).html()
|
|
}
|
|
|
|
protected test () {
|
|
it('renders', () => {
|
|
expect(this.render(BtnGroup, {
|
|
slots: {
|
|
default: ['Green', 'Orange', 'Blue'].map(text => this.renderButtonToSlot(text))
|
|
}
|
|
}).html()).toMatchSnapshot()
|
|
})
|
|
}
|
|
}
|