Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix: add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed Aug 14, 2019
1 parent f096ffa commit 694f02f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ describe('createFormatterFromChannelDef(type, format)', () => {
const formatter = createFormatterFromChannelDef({ type: 'nominal', field: 'restaurantName' });
expect(formatter('Lazy Burger')).toEqual('Lazy Burger');
});
it('uses fallback for channel definitions without type', () => {
const formatter = createFormatterFromChannelDef({ value: 'Lettuce' });
expect(formatter('Lazy Burger')).toEqual('Lazy Burger');
});
});

0 comments on commit 694f02f

Please sign in to comment.