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
Browser and OS: Chrome 127.0.6533.119 (64-bit) on MacOS 14.5
Issue description
Our test suites set the test suite time 2020-01-01 (using mockdate), and we have a test to check that valid.expirationDate will return isValid: true for "07/20". This works on versions 7 and below, but on version 8 up, it returns isValid: false.
Changing the tests to any year other than 2020 seems to work fine, but I can't work out why it doesn't work on that particular year.
To replicate it, install jest and mockdate, and then run the following test suite:
On versions 7 and below, this will pass as expected. But on versions 8 and above it fails.
Alternatively you can replicate it by simply setting your own system date to 2020-01-01, and then run console.log(valid.expirationDate('07/20')), which will incorrectly return isValid: false on versions 8 and above.
The text was updated successfully, but these errors were encountered:
General information
Issue description
Our test suites set the test suite time 2020-01-01 (using mockdate), and we have a test to check that
valid.expirationDate
will returnisValid: true
for "07/20". This works on versions 7 and below, but on version 8 up, it returnsisValid: false
.Changing the tests to any year other than 2020 seems to work fine, but I can't work out why it doesn't work on that particular year.
To replicate it, install jest and mockdate, and then run the following test suite:
On versions 7 and below, this will pass as expected. But on versions 8 and above it fails.
Alternatively you can replicate it by simply setting your own system date to 2020-01-01, and then run
console.log(valid.expirationDate('07/20'))
, which will incorrectly returnisValid: false
on versions 8 and above.The text was updated successfully, but these errors were encountered: