Files
to_docx/client/node_modules/khroma/test/methods/green.js
T
Chen Xiao 0b64e2de94 First commit.
Signed-off-by: Chen Xiao <abigwc@gmail.com>
2026-05-08 14:43:16 +08:00

26 lines
406 B
JavaScript

/* 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 );
});
});
});