Unit test problem with jsdom >= 11.12.0
mcjazzyfunky opened this issue · comments
mcjazzyfunky commented
The following unit test in "Render.spec.js" fails if a "jsdom" version >= 11.12.0 is used:
it('should render dash case styles', () => {
render(h('div', {style: {'-webkit-transform': 'scale(2)'}}), container)
assert.equal(container.firstChild.style.WebkitTransform, 'scale(2)')
})
As a quick workaround the jsdom version in package.json has been set to "11.11.0" in branch "issue76".
Sultan commented
Can refactoring it to use the string getter container.firstChild.style.cssText
instead of the implied vendor specific property fix this?
mcjazzyfunky commented
I think it's just a bug in the latest two releases of the cssstyle library.
BTW: Seems the older versions of the cssstyle library also had an issue:
I think it should be style.webkitTransform
, not style.WebkitTransform
=> lower-case "W"
To be continued....
mcjazzyfunky commented
See: jsdom/cssstyle#70