Skip to content

Commit

Permalink
Merge pull request #55 from Patrick-Sachs/style-css-vars
Browse files Browse the repository at this point in the history
Allow `style` function to test CSS variables
  • Loading branch information
nathanboktae committed Nov 27, 2021
2 parents 1bffc6d + c6b8737 commit 94a3bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chai-dom.js
Expand Up @@ -387,7 +387,7 @@
chai.Assertion.addMethod('style', function (styleProp, styleValue) {
var el = flag(this, 'object'),
style = window.getComputedStyle(el),
actual = style[styleProp];
actual = style.getPropertyValue(styleProp).trim();

this.assert(
actual === styleValue
Expand Down

0 comments on commit 94a3bf7

Please sign in to comment.