I am currently trying to test a fixed date. How can I customize my code so that I return a fixed date:
it.('reports fix date', async () => {
aService.returnValue = [{
activeFrom: '2020-04-19T10:01:58.135Z'
}];
const somethingSpy = jest.spyOn(PubSub, 'topic');
await service.report([
{
activeFrom: addDays(new Date(), 30),
}
]},
expect(somethingSpy).toHaveBeenCalledWith(
expect.objectContaining({
activeFrom: '2020-04-19T10:01:58.135Z'
})
)