angular/packages/core/testing
Andrew Scott 3974c2184e refactor(core): All views attached to application are treated as OnPush in zoneless (#55099)
This change treats all views attached to `ApplicationRef` as `OnPush`,
meaning that they have to be explicitly marked for check in order to be
refreshed when a tick happens. This prevents "accidentally" refreshing
views which have `Default` change detection as a side effect of running
change detection from an unrelated notification.

In addition, this change helps us achieve one of the big goals of the
project: that we can provide a testing experience which gives developers
more confidence that a component is zoneless-compatible. Because
`ComponentFixture` change detection is run through `ApplicationRef`
instead of `ChangeDetectorRef` when zoneless is enabled, this ensures
that the component under test has correctly been marked for check in
order to be updated. Without this, calling
`ComponentFixture.detectChanges` would allow a test to _force_ change
detection on a view when Angular would have otherwise not known that it
needed to be updated. Calling `ComponentFixture.detectChanges` on a component
which is not marked for check will now omit refreshing component view.

PR Close #55099
2024-03-29 10:42:21 -07:00
..
src refactor(core): All views attached to application are treated as OnPush in zoneless (#55099) 2024-03-29 10:42:21 -07:00
BUILD.bazel build: configure cross-pkg resolution for api extraction (#52499) 2024-01-05 11:27:34 -08:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
PACKAGE.md docs: add api doc to sub-packages (#33801) 2019-11-20 14:48:50 -08:00
public_api.ts refactor(core): Move private export testing file to src (#55103) 2024-03-28 16:35:25 -07:00