title: Angular 2 Unit Test: Custom Pipe error The pipe could not be found
body: <p>I have a custom pipe called 'myPipe'. I am getting:</p>
  <blockquote>
  <p>The pipe 'myPipe' could not be found error</p>
  </blockquote>
  <p>in my unit test ts. Pleas advice what to import and declare in my .spec.ts</p>
  <p>Here is my .spec.ts</p>
  <pre class="lang-js prettyprint-override"><code>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', () =&gt; {
    let component: MyComponent ;
    let fixture: ComponentFixture&lt;MyComponent&gt;;
  
    beforeEach(async(() =&gt; {
      TestBed.configureTestingModule({
        declarations: [ MyComponent ],
      })
      .compileComponents();
    }));
  
    beforeEach(() =&gt; {
      fixture = TestBed.createComponent(MyComponent);
      component = fixture.componentInstance;
      fixture.detectChanges();
    });
  
    it('should create', () =&gt; {
      expect(component).toBeTruthy();
    });
  });
  </code></pre>
  <p>Thanks!</p>