mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-08 10:22:47 -04:00
Fixes warnings in some tests (#2241)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
cf72077920
commit
a802656478
6 changed files with 57 additions and 25 deletions
|
@ -7,6 +7,7 @@
|
|||
import { UserAvatar } from './user-avatar'
|
||||
import { render } from '@testing-library/react'
|
||||
import type { UserInfo } from '../../../api/users/types'
|
||||
import { mockI18n } from '../../markdown-renderer/test-utils/mock-i18n'
|
||||
|
||||
describe('UserAvatar', () => {
|
||||
const user: UserInfo = {
|
||||
|
@ -14,6 +15,11 @@ describe('UserAvatar', () => {
|
|||
displayName: 'Boaty McBoatFace',
|
||||
photo: 'https://example.com/test.png'
|
||||
}
|
||||
|
||||
beforeEach(async () => {
|
||||
await mockI18n()
|
||||
})
|
||||
|
||||
it('renders the user avatar correctly', () => {
|
||||
const view = render(<UserAvatar user={user} />)
|
||||
expect(view.container).toMatchSnapshot()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue