1 import tinycolor from 'tinycolor2';
3 import tint from './tint';
5 describe('tint', () => {
6 it('tints 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 = tint(tinycolor(input), Number(index) * 10);
41 expect(output.toHexString()).toBe(expected);