From 1c43d5a7c771ecf645aa098e1b5f2d86a29ecba0 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Mon, 13 Oct 2025 15:16:55 +0200 Subject: [PATCH] frontend-plugin-api: minor expect improvements Signed-off-by: Vincenzo Scamporlino --- .../blueprints/SwappableComponentBlueprint.test.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/frontend-plugin-api/src/blueprints/SwappableComponentBlueprint.test.tsx b/packages/frontend-plugin-api/src/blueprints/SwappableComponentBlueprint.test.tsx index f51750b1e7..63436308ed 100644 --- a/packages/frontend-plugin-api/src/blueprints/SwappableComponentBlueprint.test.tsx +++ b/packages/frontend-plugin-api/src/blueprints/SwappableComponentBlueprint.test.tsx @@ -60,7 +60,7 @@ describe('SwappableComponentBlueprint', () => { ], }); - expect(await screen.findByText('test!')).toBeInTheDocument(); + await expect(screen.findByText('test!')).resolves.toBeInTheDocument(); }); it('should render a component ref without a default implementation', async () => { @@ -80,7 +80,9 @@ describe('SwappableComponentBlueprint', () => { ], }); - expect(await screen.findByTestId('test.component')).toBeInTheDocument(); + await expect( + screen.findByTestId('test.component'), + ).resolves.toBeInTheDocument(); }); it('should render a component ref with an async loader implementation', async () => { @@ -103,7 +105,7 @@ describe('SwappableComponentBlueprint', () => { ], }); - expect(await screen.findByText('test!')).toBeInTheDocument(); + await expect(screen.findByText('test!')).resolves.toBeInTheDocument(); }); it('should render a component ref with an async loader implementation and prop transform', async () => { @@ -126,6 +128,6 @@ describe('SwappableComponentBlueprint', () => { ], }); - expect(await screen.findByText('tr test!')).toBeInTheDocument(); + await expect(screen.findByText('tr test!')).resolves.toBeInTheDocument(); }); });