You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
406 B

/* IMPORT */
import {describe} from 'fava';
import {green} from '../../dist/index.js';
/* MAIN */
describe ( 'green', it => {
it ( 'gets the green channel of the color', t => {
const tests = [
['rgb(10, 20, 30)', 20],
['#102030', 32],
['hsl(10, 20%, 30%)', 66.3]
];
tests.forEach ( ([ color, output ]) => {
t.is ( green ( color ), output );
});
});
});