Skip to content

Commit

Permalink
[test] Remove unused async
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 6, 2024
1 parent d29192a commit 125a225
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ describe('<PreviewCard.Root />', () => {

const trigger = screen.getByRole('link');

await act(async () => trigger.focus());
await act(() => {
trigger.focus();
});
clock.tick(OPEN_DELAY);
await flushMicrotasks();

await act(async () => trigger.blur());
await act(() => {
trigger.blur();
});
clock.tick(CLOSE_DELAY);

expect(screen.queryByText('Content')).to.equal(null);
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/Tooltip/Root/TooltipRoot.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ describe('<Tooltip.Root />', () => {

const trigger = screen.getByRole('button');

await act(async () => {
await act(() => {
trigger.focus();
});

clock.tick(OPEN_DELAY);
await flushMicrotasks();

await act(async () => {
await act(() => {
trigger.blur();
});

Expand Down

0 comments on commit 125a225

Please sign in to comment.