Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

feat(filterFilter): compare object with custom toString() to primitive #10548

Closed
wants to merge 1 commit into from
Closed

Conversation

m7r
Copy link
Contributor

@m7r m7r commented Dec 22, 2014

Closes #10464

var obj = new Date(0);
var items = [{test: obj}];
expect(filter(items, '1970').length).toBe(1);
expect(filter(items, 1970).length).toBe(1);
Copy link
Member

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.

@gkalpak
Copy link
Member

gkalpak commented Dec 22, 2014

There is a test failing under certain browser-OS combination, which seems to be locale-specific.
Other than that, it LGTM.

@m7r
Copy link
Contributor Author

m7r commented Dec 22, 2014

How do update the pull request or should I make a new one?

@gkalpak
Copy link
Member

gkalpak commented Dec 22, 2014

@m7r: You can amend the commit and force-push to your branch; the PR will get updated automatically.
(BTW, it is better to make changes on a separate branch (not master). Take also a look here (if you haven't already).)

@m7r
Copy link
Contributor Author

m7r commented Dec 23, 2014

@gkalpak travis don't like me. What to do now?

@gkalpak
Copy link
Member

gkalpak commented Dec 23, 2014

@m7r: It was a flake. I restarted the job and it's all green now :)

@pkozlowski-opensource pkozlowski-opensource self-assigned this Jan 9, 2015
@pkozlowski-opensource pkozlowski-opensource added this to the 1.3.x milestone Jan 9, 2015
@pkozlowski-opensource
Copy link
Member

@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 pkozlowski-opensource modified the milestones: 1.4.x, 1.3.x Jan 9, 2015
@m7r
Copy link
Contributor Author

m7r commented Jan 12, 2015

@pkozlowski-opensource why is the milestone set from 1.3.9 to 1.4?

@m7r
Copy link
Contributor Author

m7r commented Feb 24, 2015

@pkozlowski-opensource what are the next steps?

@petebacondarwin
Copy link
Member

I tweaked this and landed it. Thanks @m7r

hansmaad pushed a commit to hansmaad/angular.js that referenced this pull request Mar 10, 2015
netman92 pushed a commit to netman92/angular.js that referenced this pull request Aug 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

filterFilter compare custom objects in 1.3.6
5 participants