dyo / dyo

Dyo is a JavaScript library for building user interfaces.

Home Page:https://dyo.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit test problem with jsdom >= 11.12.0

mcjazzyfunky opened this issue · comments

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".

Can refactoring it to use the string getter container.firstChild.style.cssText instead of the implied vendor specific property fix this?

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....