Latest repo

This commit is contained in:
Marc
2025-06-02 16:42:16 +00:00
parent 53ddf1a329
commit cde5fae175
27907 changed files with 3875388 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
const sample = require('./sample');
const hslToRgb = require('../converter');
const expect = require('chai').expect;
describe('hslToRgb', function () {
sample.forEach(v => {
it(`converts hsl(${v.hsl.h}, ${v.hsl.s}%, ${v.hsl.l}%) to rgb(${v.rgb.r}, ${v.rgb.g}, ${v.rgb.b})`, () => {
const converted = hslToRgb(Number(v.hsl.h), Number(v.hsl.s)/100, Number(v.hsl.l)/100);
expect(converted).to.eql([Number(v.rgb.r), Number(v.rgb.g), Number(v.rgb.b)]);
})
});
});

1
node_modules/hsl-to-rgb-for-reals/test/sample.json generated vendored Normal file

File diff suppressed because one or more lines are too long