0
私は角度2コンポーネントを作成しましたが、カルマとジャスミンを使用してコンポーネントのユニットテストを作成しようとしています。私は encountered a declaration exceptionカルマとジャスミンによるAngular2ユニットテスト - "宣言例外が発生しました"
マイspecファイルとしてexcptionを取得していますが、どこが間違っているつもりです
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { PageTitle } from '../../../components/title/title.component';
it('true is true Out ',() => expect(true).toBe(true));
describe('PageTitle (inline template)',() => {
let comp: PageTitle;
let fixture: ComponentFixture<PageTitle>;
let de: DebugElement;
let el: HTMLElement;
TestBed.configureTestingModule({
declarations: [PageTitle],
});
fixture = TestBed.createComponent(PageTitle);
comp = fixture.componentInstance;
de = fixture.debugElement.query(By.css('h1'));
el = de.nativeElement;
it('true is true in',() => expect(true).toBe(true));
});
次のようにありますか?