Skip to content

Commit 9e8a361

Browse files
committed
Fix second Avatar flake
1 parent f1d6067 commit 9e8a361

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/react/src/avatar/fallback/AvatarFallback.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22
import { Mock } from 'vitest';
33
import { Avatar } from '@base-ui-components/react/avatar';
4+
import { waitFor } from '@mui/internal-test-utils';
45
import { describeConformance, createRenderer, isJSDOM } from '#test-utils';
56
import { useImageLoadingStatus } from '../image/useImageLoadingStatus';
67

@@ -30,7 +31,9 @@ describe('<Avatar.Fallback />', () => {
3031
</Avatar.Root>,
3132
);
3233

33-
expect(queryByTestId('fallback')).to.equal(null);
34+
await waitFor(() => {
35+
expect(queryByTestId('fallback')).to.equal(null);
36+
});
3437
});
3538

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

0 commit comments

Comments
 (0)