I write test for my controller in Nestjs. I expect an array of employees contains object {id:1, firstname: 'john', lastname:'Dole'}. So I write:
it('should get an employee', () => {
return controller.findAll('john').then((data) => {
expect(data).arrayContaining([
{
id: 1,
firstname: 'john',
lastname: 'Dole',
},
]);
});
});
but got error roperty 'arrayContaining' does not exist on type 'JestMatchers<Employee[]>'
Shall I install additional package or update jest in Nestjs? I've install "@nestjs/testing": "^7.6.15",