Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
Signed-off-by: mario ma <mario.ma.node@gmail.com>
  • Loading branch information
mario-mui committed Apr 9, 2024
1 parent f849505 commit 3bc42f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('EntitySearchBar', () => {
it('should display search value and execute set callback', async () => {
const updateFilters = jest.fn();

renderInTestApp(
await renderInTestApp(
<MockEntityListContextProvider
value={{
updateFilters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/
import React, { ReactNode } from 'react';
import { fireEvent, render, waitFor } from '@testing-library/react';
import { fireEvent, waitFor } from '@testing-library/react';
import { PaginatedCatalogTable } from './PaginatedCatalogTable';
import { screen } from '@testing-library/react';
import { CatalogTableRow } from './types';
Expand Down Expand Up @@ -63,8 +63,8 @@ describe('PaginatedCatalogTable', () => {
);
};

it('should display all the items', () => {
render(
it('should display all the items', async () => {
await renderInTestApp(
wrapInContext(<PaginatedCatalogTable data={data} columns={columns} />),
);

Expand All @@ -74,7 +74,7 @@ describe('PaginatedCatalogTable', () => {
});

it('should display and invoke the next button', async () => {
const { rerender } = render(
const { rerender } = await renderInTestApp(
wrapInContext(
<PaginatedCatalogTable
data={data}
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('PaginatedCatalogTable', () => {
});

it('should display and invoke the prev button', async () => {
const { rerender } = render(
const { rerender } = await renderInTestApp(
wrapInContext(
<PaginatedCatalogTable
data={data}
Expand Down

0 comments on commit 3bc42f7

Please sign in to comment.