diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx
index 425bb61be8..adef2f64d0 100644
--- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx
+++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx
@@ -172,20 +172,18 @@ describe('', () => {
window.location.hash = '#emojis';
- await act(async () => {
- const rendered = await renderInTestApp(
-
-
- ,
- );
+ const rendered = await renderInTestApp(
+
+
+ ,
+ );
- await waitFor(() => {
- expect(
- rendered.getByTestId('techdocs-native-shadowroot'),
- ).toBeInTheDocument();
- expect(mockScrollIntoView).toHaveBeenCalled();
- expect(document.querySelector).not.toHaveBeenCalledWith('header');
- });
+ await waitFor(() => {
+ expect(
+ rendered.getByTestId('techdocs-native-shadowroot'),
+ ).toBeInTheDocument();
+ expect(mockScrollIntoView).toHaveBeenCalled();
+ expect(document.querySelector).not.toHaveBeenCalledWith('header');
});
window.location.hash = '';
@@ -199,19 +197,17 @@ describe('', () => {
useTechDocsReaderDom.mockReturnValue(document.createElement('html'));
useReaderState.mockReturnValue({ state: 'cached' });
- await act(async () => {
- const rendered = await renderInTestApp(
-
-
- ,
- );
+ const rendered = await renderInTestApp(
+
+
+ ,
+ );
- await waitFor(() => {
- expect(
- rendered.getByTestId('techdocs-native-shadowroot'),
- ).toBeInTheDocument();
- expect(document.querySelector).toHaveBeenCalledWith('header');
- });
+ await waitFor(() => {
+ expect(
+ rendered.getByTestId('techdocs-native-shadowroot'),
+ ).toBeInTheDocument();
+ expect(document.querySelector).toHaveBeenCalledWith('header');
});
});
});