koel/resources/assets/js/components/ui/ProfileAvatar.spec.ts

18 lines
471 B
TypeScript
Raw Normal View History

2022-10-13 15:18:47 +00:00
import { expect, it } from 'vitest'
import factory from '@/__tests__/factory'
import UnitTestCase from '@/__tests__/UnitTestCase'
import ProfileAvatar from './ProfileAvatar.vue'
new class extends UnitTestCase {
protected test () {
it('renders', () => {
const user = factory('user', {
2022-10-13 15:18:47 +00:00
name: 'John Doe',
avatar: 'https://example.com/avatar.jpg',
2022-10-13 15:18:47 +00:00
})
expect(this.be(user).render(ProfileAvatar).html()).toMatchSnapshot()
2022-10-13 15:18:47 +00:00
})
}
}