Skip to content

Commit

Permalink
add testcase for orderedmap predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
glenjamin committed Sep 7, 2015
1 parent 749f84b commit 4e4b941
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ describe('transit', function() {
expect(result.includes('a')).to.eql(false);
});

it('can ignore OrderedSet entries', function() {
var input = Immutable.Set.of(1, 2, 3, 3, 'a');
filter = transit.withFilter(function(val) {
return typeof val === 'number';
});
var result = filter.fromJSON(filter.toJSON(input));
expect(result.includes('a')).to.eql(false);
});

it('can ignore List entries', function() {
var input = Immutable.List.of(1, 2, 3, 3, 'a');
var result = filter.fromJSON(filter.toJSON(input));
Expand Down

0 comments on commit 4e4b941

Please sign in to comment.