diff --git a/packages/test-utils/src/testUtils/appWrappers.test.tsx b/packages/test-utils/src/testUtils/appWrappers.test.tsx
index 39e5da3df2..32ca3dfc02 100644
--- a/packages/test-utils/src/testUtils/appWrappers.test.tsx
+++ b/packages/test-utils/src/testUtils/appWrappers.test.tsx
@@ -48,14 +48,13 @@ describe('wrapInTestApp', () => {
await Promise.resolve();
});
- expect(error).toEqual([
- expect.stringMatching(
- /^Warning: An update to %s inside a test was not wrapped in act\(...\)/,
+ expect(
+ error.some(e =>
+ e.includes(
+ 'Warning: An update to %s inside a test was not wrapped in act(...)',
+ ),
),
- expect.stringMatching(
- /^Warning: An update to %s inside a test was not wrapped in act\(...\)/,
- ),
- ]);
+ ).toBeTruthy();
});
it('should render a component in a test app without warning about missing act()', async () => {
diff --git a/plugins/xcmetrics/src/components/Trend/Trend.test.tsx b/plugins/xcmetrics/src/components/Trend/Trend.test.tsx
index 90981e5401..07085150a5 100644
--- a/plugins/xcmetrics/src/components/Trend/Trend.test.tsx
+++ b/plugins/xcmetrics/src/components/Trend/Trend.test.tsx
@@ -24,7 +24,7 @@ describe('Trend', () => {
const rendered = await renderInTestApp(
,
);
- expect(rendered.findAllByText('testTitle')).toBeTruthy();
+ expect(await rendered.findAllByText('testTitle')).toBeTruthy();
});
it('should render empty state', async () => {
@@ -32,6 +32,6 @@ describe('Trend', () => {
const rendered = await renderInTestApp(
,
);
- expect(rendered.findAllByText('testTitle')).toBeTruthy();
+ expect(await rendered.findAllByText('testTitle')).toBeTruthy();
});
});