diff --git a/src/lib/components/Avatar/Avatar.spec.tsx b/src/lib/components/Avatar/Avatar.spec.tsx
index 4d16e6b48..52188f906 100644
--- a/src/lib/components/Avatar/Avatar.spec.tsx
+++ b/src/lib/components/Avatar/Avatar.spec.tsx
@@ -4,8 +4,8 @@ import { Avatar } from '.';
import { Flowbite } from '../Flowbite';
import type { CustomFlowbiteTheme } from '../Flowbite/FlowbiteTheme';
-describe.concurrent('Components / Avatar', () => {
- describe.concurrent('Theme', () => {
+describe('Components / Avatar', () => {
+ describe('Theme', () => {
it('should use custom classes', () => {
const theme: CustomFlowbiteTheme = {
avatar: {
@@ -23,6 +23,18 @@ describe.concurrent('Components / Avatar', () => {
expect(img()).toHaveClass('h-64 w-64');
});
});
+ describe('Placeholder', () => {
+ it('should display placeholder initials', () => {
+ render(
+
+
+ ,
+ );
+
+ expect(initialsPlaceholder()).toHaveTextContent('RR');
+ });
+ });
});
const img = () => screen.getByTestId('flowbite-avatar-img');
+const initialsPlaceholder = () => screen.getByTestId('flowbite-avatar-initials-placeholder');
diff --git a/src/lib/components/Avatar/index.tsx b/src/lib/components/Avatar/index.tsx
index 006057a2e..ef2d321cf 100644
--- a/src/lib/components/Avatar/index.tsx
+++ b/src/lib/components/Avatar/index.tsx
@@ -64,7 +64,9 @@ const AvatarComponent: FC = ({
bordered && theme.bordered,
)}
>
- {placeholderInitials}
+
+ {placeholderInitials}
+
) : (