(
component: Type<T>,
direction: Direction = 'ltr',
beforeInitialChangeDetection?: (fixture: ComponentFixture<T>) => void,
)
| 915 | }); |
| 916 | |
| 917 | function createComponent<T>( |
| 918 | component: Type<T>, |
| 919 | direction: Direction = 'ltr', |
| 920 | beforeInitialChangeDetection?: (fixture: ComponentFixture<T>) => void, |
| 921 | ): ComponentFixture<T> { |
| 922 | directionality = signal(direction); |
| 923 | |
| 924 | TestBed.configureTestingModule({ |
| 925 | providers: [provideFakeDirectionality(directionality)], |
| 926 | }); |
| 927 | |
| 928 | fixture = TestBed.createComponent<T>(component); |
| 929 | beforeInitialChangeDetection?.(fixture); |
| 930 | fixture.detectChanges(); |
| 931 | |
| 932 | chipListboxDebugElement = fixture.debugElement.query(By.directive(MatChipListbox))!; |
| 933 | chipListboxNativeElement = chipListboxDebugElement.nativeElement; |
| 934 | chipListboxInstance = chipListboxDebugElement.componentInstance; |
| 935 | testComponent = fixture.debugElement.componentInstance; |
| 936 | chips = chipListboxInstance._chips; |
| 937 | primaryActions = chipListboxNativeElement.querySelectorAll<HTMLElement>( |
| 938 | '.mdc-evolution-chip__action--primary', |
| 939 | ); |
| 940 | |
| 941 | return fixture; |
| 942 | } |
| 943 | }); |
| 944 | |
| 945 | @Component({ |
no test coverage detected
searching dependent graphs…