Last active
May 24, 2021 10:29
-
-
Save bengry/b39f4eb6d98f1cc238882892d604dea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { setupMockDate, MockDateSetup } from 'test-utils'; | |
let mockDate: MockDateSetup; | |
beforeEach(() => { | |
mockDate = setupMockDate(); | |
}); | |
afterEach(() => { | |
mockDate.reset(); | |
}); | |
test("...", () => { | |
mockDate.set({ offset: 600, isoDate: '2019-07-14T07:50:51.386Z' }); | |
new Date() // Sun Jul 14 2019 17:50:51 GMT+1000 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment