DEV Community

Lumin
Lumin

Posted on

Mock new Date with sinon

const mockNow = new Date()

beforeEach(() => {
  sinon.useFakeTimers(mockNow.getTime())
})
Enter fullscreen mode Exit fullscreen mode

Bye

Top comments (0)