1 import tinycolor from 'tinycolor2';
3 import shade from './shade';
5 describe('shade', () => {
6 it('shades a color', () => {
7 /* in steps of 10 from 0 to 100*/
8 const expectedByBase = {
37 for (const [input, outputs] of Object.entries(expectedByBase)) {
38 for (const [index, expected] of Object.entries(outputs)) {
39 const output = shade(tinycolor(input), Number(index) * 10);
41 expect(output.toHexString()).toBe(expected);