I am trying to test the following code, but it seems that there is some dependency missing, something similar to rxjs, if anyone can identify I will be grateful
Test
let paginatorMock: jest.Mocked<MatPaginator> = {
pageIndex: 1,
length: 1,
pageSize: 10,
page: {
next: jest.fn() as any
}
} as unknown as jest.Mocked<MatPaginator>;
fixture = TestBed.createComponent(ListarOperacoesComponent);
component = fixtureponentInstance;
fixture.detectChanges();
component.dataSource.paginator = paginatorMock;
});
Error
TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.
152 | component = fixtureponentInstance;
153 | fixture.detectChanges();
> 154 | component.dataSource.paginator = paginatorMock;
| ^
155 | });
156 |
157 | test('Funcao buscarOperacoes deve retornar Operacoes corretamente', () => {