Skip to content

Commit

Permalink
add custom converter to convert test
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarneo committed May 11, 2016
1 parent 426618d commit c1a0407
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/converters/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ describe('roc', () => {
it('should return undefined if it could not be converted', () => {
expect(convert(toBoolean, toInteger)('{}')).toEqual(undefined);
});

it('should be possible to define a custom converter', () => {
expect(convert((input) => {
if (input === 'custom') {
return true;
}

return false;
})('custom')).toEqual(true);
});
});
});
});

0 comments on commit c1a0407

Please sign in to comment.