You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the reason is because it is attempting to get the number of days in the current month and apply that to the from month. I tried to run this test today March 30 and attempting to get a 1 month range returns March 02 (since there are 28 days in February in 2022).
Here is the where we are subtracting relative.num the current month:
I think we can either update the test to also check for equality expect(m).toBeLessThanOrEqual(curMonth), or adjust relativeDateToRange to roll to previous month in these edge cases.
The text was updated successfully, but these errors were encountered:
For
utils.test.ts
,expect(m).toBeLessThan(curMonth);
test fails on occasion:hub.js/packages/common/test/search/utils.test.ts
Lines 200 to 216 in 43c9997
I believe the reason is because it is attempting to get the number of days in the current month and apply that to the
from
month. I tried to run this test todayMarch 30
and attempting to get a 1 month range returnsMarch 02
(since there are 28 days in February in 2022).Here is the where we are subtracting
relative.num
the current month:hub.js/packages/common/src/search/utils.ts
Lines 219 to 223 in 43c9997
I think we can either update the test to also check for equality
expect(m).toBeLessThanOrEqual(curMonth)
, or adjustrelativeDateToRange
to roll to previous month in these edge cases.The text was updated successfully, but these errors were encountered: