-
Notifications
You must be signed in to change notification settings - Fork 27k
Open
Labels
area: docsRelated to the documentationRelated to the documentation
Milestone
Description
Describe the problem that you experienced
With zoneless becoming the default, fakeAsync can't be used anymore.
Besides, Angular will now support Vitest and Jasmine, which both provide different ways of faking timers/clock. And those fake timers/clock have an impact on whether await fixture.whenStable() will return or not.
To make it even more subtle and complex, Vitest browser mode has expect.element() which retries assertions every N milliseconds, and that of course is also interfering with fake timers.
It would be nice if the documentation revamped the section about fake async tests to illustrate common sccenarios, with those various frameworks:
- a component delegating to a mock service returning a promise
- a component using setTimeout, setInterval and RxJS delay() or debounceTime()
Enter the URL of the topic with the problem
https://angular.dev/guide/testing/components-scenarios#async-test-with-fakeasync
Describe what you were looking for in the documentation
No response
Describe the actions that led you to experience the problem
No response
Describe what you want to experience that would fix the problem
No response
Add a screenshot if that helps illustrate the problem
No response
If this problem caused an exception or error, please paste it here
If the problem is browser-specific, please specify the device, OS, browser, and version
Provide any additional information here in as much as detail as you can
jase88, alexanderharding and BojanKogoj
Metadata
Metadata
Assignees
Labels
area: docsRelated to the documentationRelated to the documentation