Skip to content

Commit 9f4d69e

Browse files
fshowalterdomenic
authored andcommitted
add regression test
1 parent 2c26308 commit 9f4d69e

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
@@ -1100,3 +1100,17 @@ describe("regression test for https://github.com/jsdom/jsdom/issues/3021", () =>
11001100
assert.strictEqual(style.font, "bold 4px sans-serif");
11011101
});
11021102
});
1103+
1104+
describe("regression test for https://github.com/jsdom/cssstyle/issues/214", () => {
1105+
it("should return value for each property", () => {
1106+
const style = new CSSStyleDeclaration();
1107+
const key = "background-color";
1108+
const camel = "backgroundColor";
1109+
const value = "var(--foo)";
1110+
style[key] = value;
1111+
assert.strictEqual(style[key], value);
1112+
style[key] = null;
1113+
style[camel] = value;
1114+
assert.strictEqual(style[camel], value);
1115+
});
1116+
});

0 commit comments

Comments
 (0)