title: Angular 4 pipe unit test not working for basic pipe
body: <p>Angular 4 pipe unit test not working for basic pipe</p>
  
  <blockquote>
    <p>Karma error I get: TypeError: Cannot read property '0' of undefined</p>
  </blockquote>
  
  <p><strong>This is my pipe (very basic):</strong></p>
  
  <pre><code>import { Pipe, PipeTransform } from "@angular/core";
  
  @Pipe({
    name: "userPipe",
    pure: true
  })
  
  export class MyFilter implements PipeTransform {
     transform(items: any, [listOfItems]: any) {
  
       // Example of a pipe: listOfItems = listOfItems.filter(item =&gt; item.type === "test");
  
       return listOfItems;
    }
  }
  </code></pre>
  
  <p><strong>This is my pipe unit test:</strong></p>
  
  <pre><code>import { MyFilter } from "./user.pipe";
  
  describe("userPipe", () =&gt; {
    let pipe: MyFilter;
    let fakeResponse = ["abc"];
  
    beforeEach(() =&gt; {
      pipe = new MyFilter();
    });
  
    it("transforms abc to abc", () =&gt; {
      expect(pipe.transform(fakeResponse)).toEqual(fakeResponse);
    });
  });
  </code></pre>