How to mock date object in AdonisJS test

How do you mock date object in AdonisJS tests?

Found an easy way to do it here:

https://untangled.io/how-to-mock-date-now-to-keep-date-based-unit-tests-predictable/

1 Like