Skip to content

Commit

Permalink
fix(color): fix ColorUtils unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Benitte committed May 9, 2016
1 parent fad06c7 commit bd9e03d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/ColorUtils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ test(`getColorGenerator() 'inherit:brighter(*)' should support floats`, t => {
t.deepEqual(colorGenerator({ data: { color }}), d3.rgb(color).brighter(.3));
});

test(`getColorGenerator() should throw on invalid directive`, t => {
t.throws(() => {
getColorGenerator('invalid');
}, 'Unable to determine color generator');
test(`getColorGenerator() should return directive if no match found`, t => {
const color = '#F00';
const colorGenerator = getColorGenerator(color);

t.is(colorGenerator, color);
});

0 comments on commit bd9e03d

Please sign in to comment.