Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Feb 27, 2020
1 parent 7b35a24 commit 7cdd808
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/node/test/transports/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ describe('HTTPTransport', () => {
const now = Date.now();
const mock = jest
.spyOn(Date, 'now')
// Initialize _disabledUntil attribute
.mockReturnValueOnce(now)
// Check for first event
.mockReturnValueOnce(now)
// Setting disableUntil
// Setting disabledUntil
.mockReturnValueOnce(now)
// Check for second event
.mockReturnValueOnce(now + (retryAfterSeconds / 2) * 1000)
Expand Down
4 changes: 3 additions & 1 deletion packages/node/test/transports/https.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ describe('HTTPSTransport', () => {
const now = Date.now();
const mock = jest
.spyOn(Date, 'now')
// Initialize _disabledUntil attribute
.mockReturnValueOnce(now)
// Check for first event
.mockReturnValueOnce(now)
// Setting disableUntil
// Setting disabledUntil
.mockReturnValueOnce(now)
// Check for second event
.mockReturnValueOnce(now + (retryAfterSeconds / 2) * 1000)
Expand Down

0 comments on commit 7cdd808

Please sign in to comment.