Skip to content

Commit 362cdb2

Browse files
test: read a held value last in the syntax-equivalence probe
A value left open swallowed the declaration written after it, so the raw side set nothing once the printer started closing what the input left open.
1 parent 0197022 commit 362cdb2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎test/specCases/syntaxEquivalence.spectest.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,10 @@ describe(`printer output in real ${ENGINE}`, () => {
10231023
*/
10241024
const readBack = (property, value, through) => {
10251025
probe.style.cssText = "";
1026+
// The holder goes last: a value left open would swallow a declaration
1027+
// after it, where the end of the list closes it as its own source did.
10261028
probe.style.cssText = through
1027-
? `${custom}:${value};${property}:var(${custom})`
1029+
? `${property}:var(${custom});${custom}:${value}`
10281030
: `${property}:${value}`;
10291031
/** @type {string[]} */
10301032
const names = [];

0 commit comments

Comments
 (0)