我有一个定制的管道叫“我的管道”。我得到:
找不到管道“ myPipe”错误
在我的单元测试测试。请建议什么导入和声明在我的。规格
这是我的眼镜
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { MyComponent } from './main-page-carousel.component';
describe('CarouselComponent', () => {
let component: MyComponent ;
let fixture: ComponentFixture<MyComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MyComponent ],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MyComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
谢谢!