Skip to content

Commit

Permalink
Skip Box test in JSDom
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Aug 24, 2023
1 parent 35b1946 commit efd64ba
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/mui-system/src/Box/Box.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,13 @@ describe('<Box />', () => {
});

describe('prop: maxWidth', () => {
it('should resolve breakpoints with custom units', () => {
it('should resolve breakpoints with custom units', function test() {
const isJSDOM = /jsdom/.test(window.navigator.userAgent);

if (isJSDOM) {
this.skip();
}

const theme = createTheme({
breakpoints: {
unit: 'rem',
Expand All @@ -293,12 +299,13 @@ describe('<Box />', () => {

const { container } = render(
<ThemeProvider theme={theme}>
<Box maxWidth="xs" />
<Box maxWidth="xs" />,
</ThemeProvider>,
);

expect(container.firstChild).toHaveComputedStyle({
maxWidth: '10rem',
// 10rem x 16px = 160px
maxWidth: '160px',
});
});
});
Expand Down

0 comments on commit efd64ba

Please sign in to comment.