Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 05e8555

Browse files
committedApr 12, 2025·
test(multiple): remove noop module from tests
Removes the `NoopAnimationsModule` from all tests since it's not necessary in most cases. For the cases where it's relevant, it has been replaced with our own token for disabling animations.
1 parent 4e0ea8e commit 05e8555

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+184
-332
lines changed
 

‎src/cdk/text-field/autosize.spec.ts

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
} from '@angular/core/testing';
1010
import {FormsModule} from '@angular/forms';
1111
import {By} from '@angular/platform-browser';
12-
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
1312
import {dispatchFakeEvent} from '../testing/private';
1413
import {CdkTextareaAutosize} from './autosize';
1514
import {TextFieldModule} from './text-field-module';
@@ -24,7 +23,6 @@ describe('CdkTextareaAutosize', () => {
2423
imports: [
2524
FormsModule,
2625
TextFieldModule,
27-
NoopAnimationsModule,
2826
AutosizeTextAreaWithContent,
2927
AutosizeTextAreaWithValue,
3028
AutosizeTextareaWithNgModel,

‎src/material/autocomplete/autocomplete.spec.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ import {
3535
} from '@angular/core/testing';
3636
import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms';
3737
import {By} from '@angular/platform-browser';
38-
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
3938
import {EMPTY, Observable, Subject, Subscription} from 'rxjs';
4039
import {map, startWith} from 'rxjs/operators';
41-
import {MatOption, MatOptionSelectionChange} from '../core';
40+
import {MATERIAL_ANIMATIONS, MatOption, MatOptionSelectionChange} from '../core';
4241
import {MatFormField, MatFormFieldModule} from '../form-field';
4342
import {MatInputModule} from '../input';
4443
import {
@@ -65,10 +64,12 @@ describe('MatAutocomplete', () => {
6564
MatInputModule,
6665
FormsModule,
6766
ReactiveFormsModule,
68-
NoopAnimationsModule,
6967
OverlayModule,
7068
],
71-
providers,
69+
providers: [
70+
...providers,
71+
{provide: MATERIAL_ANIMATIONS, useValue: {animationsDisabled: true}},
72+
],
7273
declarations: [component],
7374
});
7475

0 commit comments

Comments
 (0)
Please sign in to comment.