-
Notifications
You must be signed in to change notification settings - Fork 626
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
fix: plural of date picker #831
fix: plural of date picker #831
Conversation
Louis Phan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@louisphn Thanks for the contribution! I think there's just an issue connecting your github account to the email. You need to either add the email you used to sign the CLA to your github account or sign it again with an email that is attached to your github account. |
Codecov Report
@@ Coverage Diff @@
## main #831 +/- ##
==========================================
- Coverage 73.09% 67.45% -5.64%
==========================================
Files 65 81 +16
Lines 2311 2838 +527
Branches 421 545 +124
==========================================
+ Hits 1689 1914 +225
- Misses 594 896 +302
Partials 28 28
Continue to review full report at Codecov.
|
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.
Awesome, thank you so much for your contribution!
The only thing I would ask is if you can figure out why this test was NOT failing.
https://github.com/pyroscope-io/pyroscope/blob/main/webapp/javascript/util/formatDate.spec.ts#L10
@eh-am looks like the 'readableRange' test was skipped so it was not failing. When I changed Because it is |
@louisphn ahh that makes sense! I think it's easier to just remove this |
@eh-am true haha should have done that instead of adding only to each test |
Almost there, the tests are still failing but that's probably my fault. Here's what you should do: diff --git a/webapp/javascript/util/formatDate.spec.ts b/webapp/javascript/util/formatDate.spec.ts
index 3bfab904..f00dfb91 100644
--- a/webapp/javascript/util/formatDate.spec.ts
+++ b/webapp/javascript/util/formatDate.spec.ts
@@ -42,7 +42,7 @@ describe('FormatDate', () => {
it('works with "now"', () => {
// TODO
// not entirely sure this case is even possible to happen in the code
- expect(formatAsOBject('now')).toEqual(mockDate);
+ expect(formatAsOBject('now')).toEqual(mockDate.getTime());
});
it('works with "now-1h"', () => {
@@ -58,12 +58,12 @@ describe('FormatDate', () => {
});
it('works with "now-1m"', () => {
- expect(formatAsOBject('now-1m')).toBe(1640090641741);
+ expect(formatAsOBject('now-1m')).toBe(1640090581741);
});
it('works with absolute timestamps', () => {
expect(formatAsOBject('1624192489')).toEqual(
- new Date('2021-06-20T12:34:49.000Z')
+ new Date('2021-06-20T12:34:49.000Z').getTime()
);
});
});
Also it looks like you haven't signed yet, can you have a look at it? Thank you again @louisphn! |
@eh-am I have fixed according to your code. Please take a look when you have time. Thanks! |
@petethepig can you shed some light RE the license thing? |
Please take a look at the preview screenshots and let me know if there is other issues.
Thanks!