You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,15 @@ Comments explain what code does or why it exists:
28
28
- Never mock behavior in end-to-end tests - use real data
29
29
- Mock as little as possible in unit tests - try to use real data
30
30
- Find root causes, not symptoms. Read error messages carefully before attempting fixes.
31
+
- When mocking constructors (classes) with `vi.mocked(...).mockImplementation()`, use regular functions, not arrow functions. Arrow functions can't be called with `new`.
0 commit comments