File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,11 @@ describe('HTTPTransport', () => {
9898 const now = Date . now ( ) ;
9999 const mock = jest
100100 . spyOn ( Date , 'now' )
101+ // Initialize _disabledUntil attribute
102+ . mockReturnValueOnce ( now )
101103 // Check for first event
102104 . mockReturnValueOnce ( now )
103- // Setting disableUntil
105+ // Setting disabledUntil
104106 . mockReturnValueOnce ( now )
105107 // Check for second event
106108 . mockReturnValueOnce ( now + ( retryAfterSeconds / 2 ) * 1000 )
Original file line number Diff line number Diff line change @@ -104,9 +104,11 @@ describe('HTTPSTransport', () => {
104104 const now = Date . now ( ) ;
105105 const mock = jest
106106 . spyOn ( Date , 'now' )
107+ // Initialize _disabledUntil attribute
108+ . mockReturnValueOnce ( now )
107109 // Check for first event
108110 . mockReturnValueOnce ( now )
109- // Setting disableUntil
111+ // Setting disabledUntil
110112 . mockReturnValueOnce ( now )
111113 // Check for second event
112114 . mockReturnValueOnce ( now + ( retryAfterSeconds / 2 ) * 1000 )
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ function _htmlElementAsString(el: unknown): string {
350350 * Returns a timestamp in seconds with milliseconds precision.
351351 */
352352export function timestampWithMs ( ) : number {
353- return new Date ( ) . getTime ( ) / 1000 ;
353+ return Date . now ( ) / 1000 ;
354354}
355355
356356// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
You can’t perform that action at this time.
0 commit comments