From c6b87371be1ef1f72eec3a49434bc82996a342f4 Mon Sep 17 00:00:00 2001 From: Patrick-Sachs <33065264+Patrick-Sachs@users.noreply.github.com> Date: Tue, 23 Nov 2021 16:48:06 +0100 Subject: [PATCH] Trim CSS property values --- chai-dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chai-dom.js b/chai-dom.js index 9ffc22e..806e5ff 100644 --- a/chai-dom.js +++ b/chai-dom.js @@ -387,7 +387,7 @@ chai.Assertion.addMethod('style', function (styleProp, styleValue) { var el = flag(this, 'object'), style = window.getComputedStyle(el), - actual = style.getPropertyValue(styleProp); + actual = style.getPropertyValue(styleProp).trim(); this.assert( actual === styleValue