Skip to content

Commit

Permalink
Remove null from resolve() in icon.test.tsx (opensearch-project#584)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergey Myssak <[email protected]>
Signed-off-by: Andrey Myssak <[email protected]>
  • Loading branch information
andreymyssak and SergeyMyssak committed May 29, 2023
1 parent 8290c9f commit 47c290e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/icon/icon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ const prettyHtml = cheerio.load('');
function testIcon(props: PropsOf<OuiIcon>) {
return () => {
expect.assertions(1);
return new Promise((resolve) => {
return new Promise<void>((resolve) => {
const onIconLoad = () => {
component.update();
expect(prettyHtml(component.html())).toMatchSnapshot();
resolve(null);
resolve();
};
const component = mount(<OuiIcon {...props} onIconLoad={onIconLoad} />);
});
Expand Down

0 comments on commit 47c290e

Please sign in to comment.