Skip to content

Commit

Permalink
test settimeout
Browse files Browse the repository at this point in the history
Refs: #6963
  • Loading branch information
Makko74 committed Nov 8, 2024
1 parent 86c9922 commit a5c3b70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/components/src/utils/testing/snapshot-testing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export const executeSnapshotTests = <Props extends Record<string, unknown>>(Comp
describe(ComponentName, () => {
const testTable: [string, Props][] = propVariants.map((props) => [propsToLabel(props), props]);

jest.useFakeTimers();
jest.spyOn(global, 'setTimeout');

it.each(testTable)('should render with %s', async (_, props) => {
const page = await newSpecPage({
components,
Expand Down

0 comments on commit a5c3b70

Please sign in to comment.