mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Alex Rickabaugh
parent
fc5d187da5
commit
ea2ea5e65b
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user