-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Uptime] Mock prototype in unit test to prevent relative date breaking snapshots. #73531
[Uptime] Mock prototype in unit test to prevent relative date breaking snapshots. #73531
Conversation
Pinging @elastic/uptime (Team:uptime) |
I verified this fix locally and am merging to unblock CI. |
💚 Build SucceededBuild metrics
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
I've applied |
Summary
Fixes #73522.
A call to a
moment
function was using relative time, and it has been two years since the date specified, so it started providing a different value, which has caused the test snapshot to break. I've mocked the moment prototype in the test file and it has resolved the problem for me locally.Checklist
Delete any items that are not applicable to this PR.
For maintainers