Skip to content

Commit

Permalink
Fix second Avatar flake
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Feb 18, 2025
1 parent f1d6067 commit 9e8a361
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react/src/avatar/fallback/AvatarFallback.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { Mock } from 'vitest';
import { Avatar } from '@base-ui-components/react/avatar';
import { waitFor } from '@mui/internal-test-utils';
import { describeConformance, createRenderer, isJSDOM } from '#test-utils';
import { useImageLoadingStatus } from '../image/useImageLoadingStatus';

Expand Down Expand Up @@ -30,7 +31,9 @@ describe('<Avatar.Fallback />', () => {
</Avatar.Root>,
);

expect(queryByTestId('fallback')).to.equal(null);
await waitFor(() => {
expect(queryByTestId('fallback')).to.equal(null);
});
});

it('should render the fallback if the image fails to load', async () => {
Expand Down

0 comments on commit 9e8a361

Please sign in to comment.