2023-03-29 12:42:47 +02:00
|
|
|
import { render, screen, cleanup } from '@testing-library/react';
|
|
|
|
|
import { describe, expect, it, afterEach } from 'vitest';
|
2023-03-17 23:05:30 +01:00
|
|
|
import { AppAvatar } from './AppAvatar';
|
|
|
|
|
|
2023-03-20 23:17:17 +01:00
|
|
|
describe('AppAvatar', () => {
|
2023-03-29 12:42:47 +02:00
|
|
|
afterEach(cleanup);
|
2023-03-20 23:17:17 +01:00
|
|
|
|
2023-03-29 12:42:47 +02:00
|
|
|
it('display placeholder when no url', () => {
|
|
|
|
|
render(<AppAvatar iconUrl="" color="blue" />);
|
2023-03-17 23:05:30 +01:00
|
|
|
|
2023-03-29 12:42:47 +02:00
|
|
|
expect(screen.getByTestId('app-avatar')).toBeDefined();
|
2023-03-17 23:05:30 +01:00
|
|
|
});
|
|
|
|
|
});
|