-
Notifications
You must be signed in to change notification settings - Fork 26.1k
feat(core): Move zoneless change detection to dev preview #60748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deployed adev-preview for e546e31 to: https://ng-dev-previews-fw--pr-angular-angular-60748-adev-prev-d65gzfow.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
Great to see that zoneless is moving to developer preview! What I’m still missing, though, is communication around testing. A lot of existing tests rely on fakeAsync or waitForAsync, which don’t work without zone.js. This raises important questions: Is there a migration path? What’s the recommended approach to handle async behavior in tests going forward? If fakeAsync/waitForAsync are no longer supported, this could mean a substantial rewrite of many tests. I’d even argue that switching an application to zoneless is relatively straightforward — but updating the tests might be significantly more challenging. If there’s already an issue or discussion covering this topic, it would be great to link it here. Otherwise, happy to open one if that helps. |
You do not have to remove fakeAsync from your tests unless you want to purge the ZoneJs library entirely. It’s not much different from any other mock clock library. You could migrate to a different mock clock implementation like sinonJS or jasmine clock if you want. |
Thanks, I understand. Still, I wonder - if I choose to go zoneless in my app, wouldn’t it feel natural to do the same in my tests? It might be helpful to include a note in the docs explaining:
Would that be something worth adding? I’d be more than happy to help out with a PR if that’s helpful! |
Yes, absolutely. The testing documentation in general could use a good refresh and these would be good topics to cover. Some of them are already in the component testing scenarios page, though that page should be reviewed and updated as a whole. |
Very good. Then I have something to do :) |
4b4df59
to
fe8a0ab
Compare
This commit moves zoneless from experimental to developer preview. * Update tag on provider API * Remove "experimental" from provider name * Move documentation from "experimental features" to "Best practives -> Performance" (at least temporarily until there is a better place) BREAKING CHANGE: `provideExperimentalZonelessChangeDetection` is renamed to `provideZonelessChangeDetection` as it is now "Developer Preview" rather than "Experimental".
fe8a0ab
to
e546e31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: global-approvers
This PR was merged into the repository by commit 953c4b2. The changes were merged into the following branches: main |
This commit moves zoneless from experimental to developer preview.
Blocked by the following:
Follow up work: