diff --git a/packages/material-ui/src/ImageList/ImageList.test.js b/packages/material-ui/src/ImageList/ImageList.test.js
index fc52e4c72e533e..1e48c189bd2398 100644
--- a/packages/material-ui/src/ImageList/ImageList.test.js
+++ b/packages/material-ui/src/ImageList/ImageList.test.js
@@ -189,18 +189,25 @@ describe('', () => {
});
describe('prop: gap', () => {
- it('should render with modified grid-template-columns style', () => {
+ it('should render with modified grid-template-columns style', function test() {
+ if (/jsdom/.test(window.navigator.userAgent)) {
+ this.skip();
+ }
+
const { getByTestId } = render(
{children}
,
);
- expect(getByTestId('test-root').style.gap).to.equal('8px');
+ expect(window.getComputedStyle(getByTestId('test-root'))).to.include({
+ rowGap: '8px',
+ columnGap: '8px',
+ });
});
it('should render with modified column-gap style', function test() {
- if (!/jsdom/.test(window.navigator.userAgent)) {
+ if (/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}
@@ -210,7 +217,10 @@ describe('', () => {
,
);
- expect(getByTestId('test-root').style['column-gap']).to.equal('8px');
+ expect(window.getComputedStyle(getByTestId('test-root'))).to.have.property(
+ 'columnGap',
+ '8px',
+ );
});
});
});