Skip to content

Commit

Permalink
[test] Add missing async
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 6, 2024
1 parent e62f72a commit 643ad01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions packages/mui-base/src/Menu/Menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ describe('<Menu />', () => {
const item2 = getByTestId('item-2');
const item3 = getByTestId('item-3');

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

Expand Down Expand Up @@ -234,7 +234,7 @@ describe('<Menu />', () => {
const item1 = getByTestId('item-1');
const item3 = getByTestId('item-3');

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

Expand All @@ -260,7 +260,7 @@ describe('<Menu />', () => {
const item1 = getByTestId('item-1');
const item2 = getByTestId('item-2');

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

Expand Down Expand Up @@ -293,7 +293,7 @@ describe('<Menu />', () => {

const items = getAllByRole('menuitem');

await act(() => {
await act(async () => {
items[0].focus();
});

Expand Down Expand Up @@ -326,7 +326,7 @@ describe('<Menu />', () => {

const items = getAllByRole('menuitem');

await act(() => {
await act(async () => {
items[0].focus();
});

Expand Down Expand Up @@ -357,7 +357,7 @@ describe('<Menu />', () => {

const items = getAllByRole('menuitem');

await act(() => {
await act(async () => {
items[0].focus();
});

Expand Down Expand Up @@ -399,7 +399,7 @@ describe('<Menu />', () => {

const items = getAllByRole('menuitem');

await act(() => {
await act(async () => {
items[0].focus();
});

Expand Down Expand Up @@ -436,7 +436,7 @@ describe('<Menu />', () => {

const items = getAllByRole('menuitem');

await act(() => {
await act(async () => {
items[0].focus();
});

Expand Down Expand Up @@ -471,7 +471,7 @@ describe('<Menu />', () => {

const items = getAllByRole('menuitem');

await act(() => {
await act(async () => {
items[0].focus();
});

Expand Down Expand Up @@ -666,7 +666,7 @@ describe('<Menu />', () => {
);

const menuItems = getAllByRole('menuitem');
await act(() => {
await act(async () => {
menuItems[0].focus();
});

Expand Down
4 changes: 2 additions & 2 deletions packages/mui-joy/src/MenuItem/MenuItem.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('Joy <MenuItem />', () => {
);
const menuitem = screen.getByRole('menuitem');

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

Expand All @@ -133,7 +133,7 @@ describe('Joy <MenuItem />', () => {

expect(handleKeyUp.callCount).to.equal(1);

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

Expand Down

0 comments on commit 643ad01

Please sign in to comment.