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
{{ message }}
Repository navigation
Vitest module mocking doesn't work in Angular 21 #32212
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
Module mocking doesn't appear to work with vitest in ng21. I have used vi.mock and vi.spyOn and neither works. This did work however with jest (CommonJS?) and jest.mock.
Please provide a link to a minimal reproduction of the bug
Activity
unit-testbuilder withvitestrunner does not supportvi.mock()#31609angular-automatic-lock-bot commentedon Jan 31, 2026
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.