Skip to content
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

M2-7464: [Mobile] Fix DatePickerItem unit tests #834

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

anq83
Copy link
Contributor

@anq83 anq83 commented Jul 26, 2024

📝 Description

After
#833
I've got error (I'm under GMT+2/+3, ~12:30 PM)

image

🔗 Jira Ticket M2-7464

Changes include:

  • Modified useless unit test to get practical sence
  • Added another unit test to the same component

The test itself was wrong:
it("Should render new Date(0) when value is 1970-01-01", ... )
new Date(0) doesn't equal to new Date(1970,0,1) because the 1st is based on UTC time, the 2nd - on local.
So, I've changed it to:
it('Should consume new Date(1970, 0, 1) when props value is "1970-01-01"', ... )

📸 Screenshots

Some information:

image image

@anq83 anq83 requested review from ChaconC and BamMironov July 26, 2024 10:06
Copy link
Contributor

@ChaconC ChaconC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed tests pass with different locale TZ

@anq83 anq83 merged commit ee0b56b into dev Jul 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants