I have a pipe
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
  name: 'filterArrayPipe'
})
export class FilterArrayPipe implements PipeTransform {
  transform(value: any, config: any, q: string) {
    if (config && q) {
      return value.filter(result => {
        return config.some(type => result[type].toString().toLowerCase().indexOf(q) > -1);
      });
    } else {
      return value;
    }
  }
}
and now I want to make a unit test
import { FilterArrayPipe } from './filter-array.pipe';
describe('Pipe: FilterArray Pipe', () => {
  it('providing search value should return true', () => {
      const pipe = new FilterArrayPipe();
      expect(pipe.transform([{id: 123}, {id: 456}], ['id'], '456'))
        .toBe([{id: 456}]);
  });
});
But I get the follwowing error
Expected [ Object({ id: 456 }) ] to be [ Object({ id: 456 }) ].
 
    