Node.js version
v22
jsdom version
v27
Minimal reproduction case
const { JSDOM } = require("jsdom");
const dom = new JSDOM(``, {});
const document = dom.window.document;
const p = document.createElement("p");
const transform = "translate(calc(10%), 10%)";
p.style.transform = transform;
console.assert(p.style.transform === transform, "p.style.transform should be\n", transform, "\nbut is\n", p.style.transform);
How does similar code behave in browsers?
In Chrome this assertion just passes.
What is the problem?
The assertion fails with:
Assertion failed: p.style.transform should be
translate(calc(10%), 10%)
but is
translate(calc(10%),10%)
In v26 there were no semantic checks, but at least my tests did not fail.
If I update my tests, I need to update them again as soon as jsdom aligns with the browser again.
Node.js version
v22
jsdom version
v27
Minimal reproduction case
How does similar code behave in browsers?
In Chrome this assertion just passes.
What is the problem?
The assertion fails with:
In v26 there were no semantic checks, but at least my tests did not fail.
If I update my tests, I need to update them again as soon as jsdom aligns with the browser again.