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 b4b8cb1
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions packages/test-utils/src/describeConformance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -988,22 +988,10 @@ 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');
}

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

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

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

const theme = createTheme({
Expand Down

0 comments on commit b4b8cb1

Please sign in to comment.