You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/testing.mdx
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,12 @@ module.exports = {
58
58
}
59
59
```
60
60
61
+
### Testing on web with JSDOM
62
+
63
+
When utilizing JSDOM for testing purposes, it is required to provide the implementation
64
+
for `window.matchMedia`, as this functionality is absent in JSDOM, yet it is a dependency for Unistyles.
65
+
66
+
For a comprehensive approach, refer to the official `jest` documentation on [mocking methods that are not implemented in JSDOM](https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom).
61
67
### Support
62
68
63
69
Mocks support basic operations and are designed to mimic the setting of themes and breakpoints.
0 commit comments