github ricokahler/color2k v1.0.0-rc.4
JSDOM support

latest releases: v2.0.3, v2.0.2, v2.0.1...
4 years ago

getComputedStyle in JSDOM does not behave the same way as the browser. In order add support for JSDOM (and in turn, add support for JSDOM within Jest), an explicit check for JSDOM was added.

Small breaking change: the @color2k/node package was renamed to @color2k/compat and instead of being bundled as a commonjs (cjs) module, it's now bundled as a UMD module. This makes it so that this module can be evaluated and used inside of JSDOM via eval w/ { runScripts: 'outside-only' }.

See the tests for more details.

Note: if you'd like to run color2k inside of Jest with the environment jest-environment-jsdom, all you need to do is install @color2k/compat

Don't miss a new color2k release

NewReleases is sending notifications on new releases.