Skip to content

Commit 171f128

Browse files
karajosephperrott
authored andcommitted
fix: move detectChanges call in tree spec to include trackBy (#15414)
1 parent ab8a338 commit 171f128

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cdk/tree/tree.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ describe('CdkTree', () => {
343343
function createTrackByTestComponent(trackByStrategy: 'reference' | 'property' | 'index') {
344344
configureCdkTreeTestingModule([CdkTreeAppWithTrackBy]);
345345
fixture = TestBed.createComponent(CdkTreeAppWithTrackBy);
346-
fixture.detectChanges();
347-
348346
component = fixture.componentInstance;
349347
component.trackByStrategy = trackByStrategy;
348+
fixture.detectChanges();
349+
350350
dataSource = component.dataSource as FakeDataSource;
351351
tree = component.tree;
352352
treeElement = fixture.nativeElement.querySelector('cdk-tree');
@@ -758,10 +758,10 @@ describe('CdkTree', () => {
758758
function createTrackByTestComponent(trackByStrategy: 'reference' | 'property' | 'index') {
759759
configureCdkTreeTestingModule([NestedCdkTreeAppWithTrackBy]);
760760
fixture = TestBed.createComponent(NestedCdkTreeAppWithTrackBy);
761-
fixture.detectChanges();
762-
763761
component = fixture.componentInstance;
764762
component.trackByStrategy = trackByStrategy;
763+
fixture.detectChanges();
764+
765765
dataSource = component.dataSource as FakeDataSource;
766766

767767
tree = component.tree;

0 commit comments

Comments
 (0)