(
component: Type<T>,
direction: Direction = 'ltr',
beforeInitialChangeDetection?: (fixture: ComponentFixture<T>) => void,
)
| 927 | }); |
| 928 | |
| 929 | function createComponent<T>( |
| 930 | component: Type<T>, |
| 931 | direction: Direction = 'ltr', |
| 932 | beforeInitialChangeDetection?: (fixture: ComponentFixture<T>) => void, |
| 933 | ): ComponentFixture<T> { |
| 934 | directionality = signal(direction); |
| 935 | |
| 936 | TestBed.configureTestingModule({ |
| 937 | providers: [provideFakeDirectionality(directionality)], |
| 938 | }); |
| 939 | |
| 940 | const fixture = TestBed.createComponent<T>(component); |
| 941 | beforeInitialChangeDetection?.(fixture); |
| 942 | fixture.detectChanges(); |
| 943 | |
| 944 | chipListboxDebugElement = fixture.debugElement.query(By.directive(MatChipListbox))!; |
| 945 | chipListboxNativeElement = chipListboxDebugElement.nativeElement; |
| 946 | chipListboxInstance = chipListboxDebugElement.componentInstance; |
| 947 | testComponent = fixture.debugElement.componentInstance; |
| 948 | chips = chipListboxInstance._chips; |
| 949 | primaryActions = chipListboxNativeElement.querySelectorAll<HTMLElement>( |
| 950 | '.mdc-evolution-chip__action--primary', |
| 951 | ); |
| 952 | |
| 953 | return fixture; |
| 954 | } |
| 955 | }); |
| 956 | |
| 957 | @Component({ |
no test coverage detected