Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii committed Aug 13, 2024
1 parent 820167d commit ed26c3e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages-internal/test-utils/src/describeConformance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ function describeConformance(
});
window.matchMedia = () =>
({
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down
1 change: 1 addition & 0 deletions packages/mui-joy/src/styles/CssVarsProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe('[Joy] CssVarsProvider', () => {
});
window.matchMedia = () =>
({
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down
1 change: 1 addition & 0 deletions packages/mui-joy/src/styles/extendTheme.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ describe('extendTheme', () => {
configurable: true,
});
window.matchMedia = () => ({
// Keep mocking legacy methods because older code might still use them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down
1 change: 1 addition & 0 deletions packages/mui-material/src/styles/ThemeProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('ThemeProvider', () => {
});
window.matchMedia = () =>
({
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe('[Material UI] ThemeProviderWithVars', () => {
configurable: true,
});
window.matchMedia = () => ({
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down
1 change: 1 addition & 0 deletions packages/mui-material/src/styles/extendTheme.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('extendTheme', () => {
configurable: true,
});
window.matchMedia = () => ({
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('createCssVarsProvider', () => {
let storage = {};
const createMatchMedia = (matches) => () => ({
matches,
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('useCurrentColorScheme', () => {

const createMatchMedia = (matches) => () => ({
matches,
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: (listener) => {
trigger = listener;
},
Expand Down
1 change: 1 addition & 0 deletions test/integration/mui-system/theme-scoping.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe('Multiple nested theme providers', () => {
let storage: Record<string, string> = {};
const createMatchMedia = (matches: boolean) => () => ({
matches,
// Keep mocking legacy methods because @mui/material v5 still uses them
addListener: () => {},
addEventListener: () => {},
removeListener: () => {},
Expand Down

0 comments on commit ed26c3e

Please sign in to comment.