diff --git a/src/components/AppAvatar.test.tsx b/src/components/AppAvatar.test.tsx new file mode 100644 index 000000000..b5cb29eaf --- /dev/null +++ b/src/components/AppAvatar.test.tsx @@ -0,0 +1,16 @@ +import { render } from '@testing-library/react'; +import { describe, expect, it } from 'vitest'; +import { AppAvatar } from './AppAvatar'; + +describe(AppAvatar.name, () => { + it.concurrent('display placeholder when no url', () => { + const { container } = render(); + + expect(container.firstElementChild).not.toBeNull(); + expect(container.firstElementChild!.className).contain('mantine-Avatar-root'); + + const svgElement = container.querySelector('svg'); + expect(svgElement).not.toBeNull(); + expect(svgElement?.getAttribute('fill')).not.toBeNull(); + }); +});