test(core): update tests that were relying on implicit animations module (#59762)

We had some tests that were relying on the fact that the server module was importing animations implicitly.

PR Close #59762
This commit is contained in:
Kristiyan Kostadinov
2025-01-28 19:35:17 +01:00
committed by Alex Rickabaugh
parent fc5d187da5
commit ea2ea5e65b
6 changed files with 16 additions and 7 deletions
@@ -47,6 +47,7 @@ ts_library(
"//packages/localize",
"//packages/localize/init",
"//packages/platform-browser",
"//packages/platform-browser/animations",
"//packages/platform-server",
"//packages/private/testing",
"//packages/router",
@@ -66,6 +66,7 @@ import {provideRouter, RouterOutlet, Routes} from '@angular/router';
import {Observable} from 'rxjs';
import {renderApplication, SERVER_CONTEXT} from '../src/utils';
import {BrowserAnimationsModule, provideAnimations} from '@angular/platform-browser/animations';
const APP_CONFIG: ApplicationConfig = {
providers: [provideServerRendering()],
@@ -390,11 +391,13 @@ function createMyAnimationApp(standalone: boolean) {
}
const MyAnimationApp = createMyAnimationApp(false);
const MyAnimationAppStandalone = getStandaloneBootstrapFn(createMyAnimationApp(true));
const MyAnimationAppStandalone = getStandaloneBootstrapFn(createMyAnimationApp(true), [
provideAnimations(),
]);
@NgModule({
declarations: [MyAnimationApp],
imports: [BrowserModule, ServerModule],
imports: [BrowserModule, BrowserAnimationsModule, ServerModule],
bootstrap: [MyAnimationApp],
})
class AnimationServerModule {}