Skip to content

Commit c6c5f23

Browse files
committed
Fix jsdom
1 parent 2f9ff5e commit c6c5f23

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/adaptive-ui/.mocha-jsdom.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Fill in some gaps required by fast-element for testing in JSDOM
2+
3+
import "jsdom-global/register.js";
4+
5+
global.MutationObserver = window.MutationObserver;
6+
7+
window.matchMedia = function() {}

packages/adaptive-ui/.mocharc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"timeout": 5000,
55
"spec": "dist/**/*.spec.js",
66
"require": [
7-
"jsdom-global/register"
7+
"./.mocha-jsdom.js"
88
]
99
}

0 commit comments

Comments
 (0)