-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref: Prevent instantiating unnecessary Date objects #2442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, tests are failing, not exactly sure why (This PR or broken master)
Gotta investigate these test failures, seen unrelated to my change on first look:
https://travis-ci.com/getsentry/sentry-javascript/jobs/289100546 |
Same failures for Node 6, 8 and 10, respectively: |
Re-running jobs just in case |
51b7bb9
to
a9f0f26
Compare
Rebased; same tests failing as in #2442 (comment) Guessing if it is not a flake then it is related to how time is being mocked. |
a9f0f26
to
6fa083f
Compare
Rebased |
Use Date.now() instead of new Date().getTime(). Resources: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now
6fa083f
to
7b35a24
Compare
Resources:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now