mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
When running component tests in TestBed, an application may include provideClientHydration() (e.g. from appConfig.providers) or use defer blocks with hydrate triggers without hydration providers configured. In these testing scenarios, there is no serialized server state in TransferState. As a result, Angular emitted spurious warnings: - NG0505: warning that client hydration was requested but no serialized info was found. - NG0508: warning that incremental hydration is not enabled for @defer hydrate triggers. This commit introduces an internal IS_TESTING token, provided by TestBedCompiler and BrowserTestingModule, which suppresses these warnings in test environments. Fixes #62053