blowfish/node_modules/khroma/test/methods/invert.js

26 lines
427 B
JavaScript
Raw Normal View History

2023-01-29 22:30:24 +00:00
/* IMPORT */
import {describe} from 'fava';
import {invert} from '../../dist/index.js';
/* MAIN */
describe ( 'invert', it => {
it ( 'gets the inverse of the color', t => {
const tests = [
[['#b37399'], '#4c8c66'],
[['black'], '#ffffff'],
[['#550e0c', 20 ], 'rgb(102, 59.4, 58.2)']
];
tests.forEach ( ([ args, output ]) => {
t.is ( invert ( ...args ), output );
});
});
});