Skip to content

Commit 3b24cc0

Browse files
committed
Make the css unit test more resilient. Testing border width leads to rounding errors.
1 parent 5d561e8 commit 3b24cc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/css.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ define([
3232
setup: function () {
3333
// For testing that css! loaded styles don't override user-defined styles
3434
document.head.insertAdjacentHTML("beforeend",
35-
"<style>.userDefined { border: 4px solid black; }</style>");
35+
"<style>.userDefined { border: 1px dashed black; }</style>");
3636

3737
assert.strictEqual(getStyles().match(/userDefined/g).length, 1, "userDefined CSS inserted");
3838

@@ -61,7 +61,7 @@ define([
6161
assert(backgroundImage, "stylesheet loaded");
6262

6363
// Test that <style> nodes defined by app override the style that was loaded by css!
64-
assert.strictEqual(getComputedStyle(window.userDefined).borderLeftWidth, "4px",
64+
assert.strictEqual(getComputedStyle(window.userDefined).borderLeftStyle, "dashed",
6565
"user defined style wins: " + getStyles());
6666
}));
6767

0 commit comments

Comments
 (0)