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
test(common): make date pipe tests work in more timezones #21379
Conversation
Travis fails because of the application size (that fails on master), it has nothing to do with my PR |
|
||
it('should format invalid in Safari ISO date', | ||
() => expect(pipe.transform('2017-01-20T19:00:00+0000')).toEqual('Jan 20, 2017')); | ||
() => expect(pipe.transform('2017-01-20T12:00:00+0000')).toEqual('Jan 20, 2017')); | ||
|
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.
12 pm UTC is actually 1 am on Jan 21st in NZDT (+13:00) so "most" time zones.
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.
good point, I've updated the commit message :)
we could also handle this programmatically, we can get the timezone and change the expected result.
74d088d
to
183d727
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Some date pipe tests use a time that will return a different date depending on the timezone of the machine running the tests
Issue Number: #21112
What is the new behavior?
We set the time to 12h00 so that the test passes in all timezones
Does this PR introduce a breaking change?