-
Notifications
You must be signed in to change notification settings - Fork 27.4k
feat(filterFilter): compare object with custom toString()
to primitive
#10548
Conversation
var obj = new Date(0); | ||
var items = [{test: obj}]; | ||
expect(filter(items, '1970').length).toBe(1); | ||
expect(filter(items, 1970).length).toBe(1); |
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.
Hm...these tests failed on some browsers (Chrome 39 on OS X). The failures are probably related to locale.
Changing new Date(0)
to new Date(1970, 0)
should fix the issue.
Alternatively, you could change 0
to 86400000
to ensure or timezones are in 1970, but I prefer the former approach.
There is a test failing under certain browser-OS combination, which seems to be locale-specific. |
How do update the pull request or should I make a new one? |
@gkalpak travis don't like me. What to do now? |
@m7r: It was a flake. I restarted the job and it's all green now :) |
@m7r I've left some additional comments to the tests - not a big deal, I can change those while merging, but would like to have your feedback on those. |
@pkozlowski-opensource why is the milestone set from 1.3.9 to 1.4? |
@pkozlowski-opensource what are the next steps? |
I tweaked this and landed it. Thanks @m7r |
Closes #10464