Skip to content

Commit bc1ee18

Browse files
committed
test: fix test case
1 parent fd217a9 commit bc1ee18

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/CSSMotion.spec.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ describe('CSSMotion', () => {
194194
});
195195

196196
fireEvent.transitionEnd(container.querySelector('.motion-box'));
197+
act(() => {
198+
jest.runAllTimers();
199+
});
197200

198201
expect(container.querySelector('.motion-box')).toHaveClass('removed');
199202

@@ -805,6 +808,9 @@ describe('CSSMotion', () => {
805808
});
806809

807810
fireEvent.transitionEnd(container.querySelector('.motion-box'));
811+
act(() => {
812+
jest.runAllTimers();
813+
});
808814

809815
expect(container.querySelector('.motion-box')).toBeTruthy();
810816
expect(container.querySelector('.motion-box')).toHaveClass('removed');

0 commit comments

Comments
 (0)