File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ export function timeoutPromise(ms: number): Promise<void> {
1515 *
1616 * Note: this stack overflow page gives more info on why we're using this:
1717 * https://stackoverflow.com/a/42787232/915811 (basically, moment.js uses
18- * Date# now internally).
18+ * Date. now internally).
1919 */
20- export function setTestTime ( time : string ) : void {
20+ export function setTestTime ( time : number ) : void {
2121 const date = new Date ( time )
2222 // Log human-readable date to help out human testers.
2323 console . log ( `Setting test time to ${ date } ` )
@@ -37,5 +37,6 @@ export function setDefaultTestTime(): void {
3737 * the afterEach clause in test suites that require a mocked date.
3838 */
3939export function restoreDateNowBehavior ( ) : void {
40- Date . now . mockRestore && Date . now . mockRestore ( )
40+ const now = Date . now as jest . Mock
41+ now . mockRestore && now . mockRestore ( )
4142}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments