Color Interpolation test fails (on node v12.0.0+ on and Intel Based mac)
meodai opened this issue · 7 comments
✖ should be equivalent
-----------------------
operator: deepEqual
expected: |-
{ mode: 'rgb', r: 0.25808621995139014, g: 0.37241162292636104, b: 0 }
actual: |-
{ mode: 'rgb', r: 0.25808621995139025, g: 0.372411622926361, b: 0 }
at: Test.<anonymous> (/Users/neodai/Sites/culori/test/interpolate.test.js:203:4)
stack: |-
Interesting, that test case has not been changed in years... maybe a difference in the last few digits is dependent on the architecture of the machine you run it on, or the node/V8 version? 🤔
[0, 0.1, 0.2, 0.5, 0.8, 1].forEach(t0 => {
t.deepEqual(
interpolate(['red', 0.5, 'green'])(t0),
interpolate(['red', 'green'])(t0)
);
});
Is this the only test that fails?
Its the only test that fails.
I'm on node v16.9.1 / osx 11.6
It this ends up being the issue you could add: { "engines" : { "node" : ">=whaterver" } }
to the package json
I've tried running the tests in GitHub Actions, and they pass even with Node 16.9.1, and I can't reproduce the issue locally on macOS 11.6 (M1 processor) with that Node version installed...
It's also bizarre in that interpolate(['red', 'green'])(t0)
does not produce that color value for t0 in [0, 0.1, 0.2, 0.5, 0.8, 1]
, which seems to be the value of interpolate(['red', 0.2, 'green'])(0.5)
.
@danburzo I've done some testing :D
So.
node v9.4.0 => npm run test => pass
node v10.19.0 => npm run test => pass
node v11.0.0 => npm run test => pass
node v12.0.0 => npm run test => color interpolation hints fails
node v13.0.0 => npm run test => color interpolation hints fails
node v14.5.0 => npm run test => color interpolation hints fails
I did not continue at this point but I am currently on v16.10.0
. I am using n
as a node version manager. But I have an Intel Mac.
I am infinitely sorry for having wasted your time: this is the version I was actually testing: https://github.com/meodai/culori :( The updated version/tests pass just fine :(
Please let me know where to send beers / coffees
Ooh 😅 no worries, glad it's sorted out!