Skip to content

Commit 7ff075c

Browse files
committed
add regression test
1 parent 086e3fd commit 7ff075c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/CSSStyleDeclaration.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,3 +1053,17 @@ describe("regression test for https://github.com/jsdom/cssstyle/issues/124", ()
10531053
assert.strictEqual(style.borderWidth, "1px");
10541054
});
10551055
});
1056+
1057+
describe("regression test for https://github.com/jsdom/cssstyle/issues/214", () => {
1058+
it("should return value for each property", () => {
1059+
const style = new CSSStyleDeclaration();
1060+
const key = "background-color";
1061+
const camel = "backgroundColor";
1062+
const value = "var(--foo)";
1063+
style[key] = value;
1064+
assert.strictEqual(style[key], value);
1065+
style[key] = null;
1066+
style[camel] = value;
1067+
assert.strictEqual(style[camel], value);
1068+
});
1069+
});

0 commit comments

Comments
 (0)