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', () => {
|
2024-06-01 18:02:27 +00:00
|
|
|
const user = factory('user', {
|
2022-10-13 15:18:47 +00:00
|
|
|
name: 'John Doe',
|
2024-10-13 17:37:01 +00:00
|
|
|
avatar: 'https://example.com/avatar.jpg',
|
2022-10-13 15:18:47 +00:00
|
|
|
})
|
|
|
|
|
2024-01-15 22:26:50 +00:00
|
|
|
expect(this.be(user).render(ProfileAvatar).html()).toMatchSnapshot()
|
2022-10-13 15:18:47 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|