Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Feb 10, 2025
1 parent 1e8679c commit 9ac92fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/StrictMode.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ describe('StrictMode', () => {
act(() => {
jest.runAllTimers();
});
expect(ref.current.inMotion()).toBeTruthy();
expect(node).not.toHaveClass('transition-appear-start');
expect(node).toHaveClass('transition-appear-active');

// Trigger End
fireEvent.transitionEnd(node);
expect(node).not.toHaveClass('transition-appear');

expect(ref.current.inMotion()).toBeFalsy();
expect(ref.current.nativeElement).toBe(node);
});
});

0 comments on commit 9ac92fc

Please sign in to comment.