11import { Location } from '@angular/common' ;
22import { SpyLocation } from '@angular/common/testing' ;
33import {
4+ ANIMATION_MODULE_TYPE ,
45 Component ,
56 ErrorHandler ,
67 EventEmitter ,
78 Injectable ,
89 Injector ,
9- Type ,
10+ Provider ,
1011 ViewChild ,
1112 ViewContainerRef ,
1213 WritableSignal ,
@@ -21,7 +22,6 @@ import {
2122 tick ,
2223 waitForAsync ,
2324} from '@angular/core/testing' ;
24- import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
2525import { Direction , Directionality } from '../bidi' ;
2626import { CdkPortal , ComponentPortal , TemplatePortal } from '../portal' ;
2727import { dispatchFakeEvent } from '../testing/private' ;
@@ -47,16 +47,16 @@ describe('Overlay', () => {
4747 let dir : WritableSignal < Direction > ;
4848 let mockLocation : SpyLocation ;
4949
50- function setup ( imports : Type < unknown > [ ] = [ ] ) {
50+ function setup ( providers : Provider [ ] = [ ] ) {
5151 dir = signal < Direction > ( 'ltr' ) ;
5252 TestBed . configureTestingModule ( {
53- imports,
5453 providers : [
5554 provideFakeDirectionality ( dir ) ,
5655 {
5756 provide : Location ,
5857 useClass : SpyLocation ,
5958 } ,
59+ ...providers ,
6060 ] ,
6161 } ) ;
6262
@@ -892,7 +892,12 @@ describe('Overlay', () => {
892892 it ( 'should set a class on the backdrop when animations are disabled' , ( ) => {
893893 cleanup ( ) ;
894894 TestBed . resetTestingModule ( ) ;
895- setup ( [ NoopAnimationsModule ] ) ;
895+ setup ( [
896+ {
897+ provide : ANIMATION_MODULE_TYPE ,
898+ useValue : 'NoopAnimations' ,
899+ } ,
900+ ] ) ;
896901
897902 let overlayRef = createOverlayRef ( injector , config ) ;
898903 overlayRef . attach ( componentPortal ) ;
0 commit comments