|
1 | | -import { ComponentFixture, TestBed } from "@angular/core/testing"; |
2 | | - |
3 | | -import { SearchComponent } from "./search.component"; |
4 | | -import { ActivatedRoute } from "@angular/router"; |
5 | | -import { of } from "rxjs"; |
6 | | -import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http"; |
7 | | - |
8 | | -describe("SearchComponent", () => { |
9 | | - let component: SearchComponent; |
10 | | - let fixture: ComponentFixture<SearchComponent>; |
11 | | - |
12 | | - beforeEach(async () => { |
13 | | - await TestBed.configureTestingModule({ |
14 | | - imports: [SearchComponent], |
15 | | - providers: [ |
16 | | - provideHttpClient(withInterceptorsFromDi()), |
17 | | - { |
18 | | - provide: ActivatedRoute, |
19 | | - useValue: { |
20 | | - params: of({ problemId: "1" }), |
21 | | - queryParamMap: of({ dataset: null, entailmentLabel: null, gold: null, text: "" }), |
22 | | - } |
23 | | - }] |
24 | | - }).compileComponents(); |
25 | | - |
26 | | - fixture = TestBed.createComponent(SearchComponent); |
27 | | - component = fixture.componentInstance; |
28 | | - fixture.detectChanges(); |
29 | | - }); |
30 | | - |
31 | | - it("should create", () => { |
32 | | - expect(component).toBeTruthy(); |
33 | | - }); |
34 | | -}); |
| 1 | +import { ComponentFixture, TestBed } from "@angular/core/testing"; |
| 2 | + |
| 3 | +import { SearchComponent } from "./search.component"; |
| 4 | +import { ActivatedRoute } from "@angular/router"; |
| 5 | +import { of } from "rxjs"; |
| 6 | +import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http"; |
| 7 | + |
| 8 | +describe("SearchComponent", () => { |
| 9 | + let component: SearchComponent; |
| 10 | + let fixture: ComponentFixture<SearchComponent>; |
| 11 | + |
| 12 | + beforeEach(async () => { |
| 13 | + await TestBed.configureTestingModule({ |
| 14 | + imports: [SearchComponent], |
| 15 | + providers: [ |
| 16 | + provideHttpClient(withInterceptorsFromDi()), |
| 17 | + { |
| 18 | + provide: ActivatedRoute, |
| 19 | + useValue: { |
| 20 | + params: of({ problemId: "1" }), |
| 21 | + queryParamMap: of({ dataset: null, entailmentLabel: null, gold: null, text: "" }), |
| 22 | + } |
| 23 | + }] |
| 24 | + }).compileComponents(); |
| 25 | + |
| 26 | + fixture = TestBed.createComponent(SearchComponent); |
| 27 | + component = fixture.componentInstance; |
| 28 | + fixture.detectChanges(); |
| 29 | + }); |
| 30 | + |
| 31 | + it("should create", () => { |
| 32 | + expect(component).toBeTruthy(); |
| 33 | + }); |
| 34 | +}); |
0 commit comments