Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
RedSparr0w committed Jul 25, 2018
1 parent f79b0ce commit 961b50a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/badge-data.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const {
makeLabel,
makeLogo,
makeBadgeData,
makeColor,
setBadgeColor
} = require('./badge-data');

Expand Down Expand Up @@ -80,6 +81,15 @@ describe('Badge data helpers', function() {
});
});

test(makeColor, () => {
given('red').expect('#e05d44');
given('blue').expect('#007ec6');
given('4c1').expect('#4c1');
given('f00f00').expect('#f00f00');
given('papayawhip').expect('papayawhip');
given('purple').expect('purple');
});

test(setBadgeColor, () => {
given({}, 'red').expect({ colorscheme: 'red' });
given({}, 'f00f00').expect({ colorB: '#f00f00' });
Expand Down

0 comments on commit 961b50a

Please sign in to comment.