2023-07-21 18:08:40 +09:00
|
|
|
import { cleanup, render, screen } from '@testing-library/react';
|
|
|
|
|
import { afterEach, describe, expect, it } 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
|
|
|
});
|
|
|
|
|
});
|