Skip to content

Commit

Permalink
only test if ThemeProvider and createTheme are provided
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Mar 1, 2024
1 parent 0689c63 commit 5f94965
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions packages/test-utils/src/describeConformance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -988,22 +988,14 @@ function testThemeCustomPalette(element: React.ReactElement, getOptions: () => C
if (!/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}
const { muiName, render, ThemeProvider, createTheme } = getOptions();

if (!muiName) {
throwMissingPropError('muiName');
}
const { render, ThemeProvider, createTheme } = getOptions();

if (!render) {
throwMissingPropError('render');
}

if (!ThemeProvider) {
throwMissingPropError('ThemeProvider');
}

if (!createTheme) {
throwMissingPropError('createTheme');
if (!ThemeProvider || !createTheme) {
this.skip();
}

const theme = createTheme({
Expand Down

0 comments on commit 5f94965

Please sign in to comment.