Skip to content

Commit c6298fd

Browse files
committed
Fix test
1 parent 3c03c8b commit c6298fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/redux-devtools-inspector-monitor-trace-tab/test/StackTraceTab.spec.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { render, screen } from '@testing-library/react';
2+
import { render, screen, waitFor } from '@testing-library/react';
33
import { TraceTab } from '../src/StackTraceTab';
44

55
const actions = {
@@ -42,7 +42,10 @@ describe('StackTraceTab component', () => {
4242
const { container } = render(
4343
<TraceTabAsAny actions={actions} action={actions[2].action} />
4444
);
45-
await screen.findByTestId('stack-trace');
45+
const stackTraceDiv = await screen.findByTestId('stack-trace');
46+
await waitFor(() =>
47+
expect(stackTraceDiv.querySelector('div')).toBeTruthy()
48+
);
4649
expect(container.firstChild).toMatchSnapshot();
4750
});
4851
});

0 commit comments

Comments
 (0)