Skip to content

Commit

Permalink
Merge pull request jashkenas#1204 from kbrainwave/master
Browse files Browse the repository at this point in the history
add test case for _.intersection
  • Loading branch information
jashkenas committed Jul 25, 2013
2 parents e4d66e2 + 4e9d747 commit 20590b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ $(document).ready(function() {
equal(_(stooges).intersection(leaders).join(''), 'moe', 'can perform an OO-style intersection');
var result = (function(){ return _.intersection(arguments, leaders); })('moe', 'curly', 'larry');
equal(result.join(''), 'moe', 'works on an arguments object');
var theSixStooges = ['moe', 'moe', 'curly', 'curly', 'larry', 'larry'];
equal(_.intersection(theSixStooges, leaders).join(''), 'moe', 'returns a duplicate-free array');
});

test("union", function() {
Expand Down

0 comments on commit 20590b6

Please sign in to comment.