diff --git a/packages/material-ui-system/src/shadows.test.js b/packages/material-ui-system/src/shadows.test.js deleted file mode 100644 index 512f501ed5c922..00000000000000 --- a/packages/material-ui-system/src/shadows.test.js +++ /dev/null @@ -1,30 +0,0 @@ -import boxShadow from './shadows'; -import { assert } from 'chai'; - -describe('shadows', () => { - it('should support array theme value', () => { - const output = boxShadow({ - theme: { - shadows: ['none', '0px 1px 3px 0px rgba(0, 0, 0, 0.2)'], - }, - boxShadow: 1, - }); - - assert.deepEqual(output, { - boxShadow: '0px 1px 3px 0px rgba(0, 0, 0, 0.2)', - }); - }); - - it('should support CSS string value', () => { - const output = boxShadow({ - theme: { - shadows: ['none'], - }, - boxShadow: '0px 1px 3px 0px rgba(0, 0, 0, 0.2)', - }); - - assert.deepEqual(output, { - boxShadow: '0px 1px 3px 0px rgba(0, 0, 0, 0.2)', - }); - }); -}); diff --git a/packages/material-ui-system/src/style.test.js b/packages/material-ui-system/src/style.test.js index 12f845a29a546e..c027d413ca51bf 100644 --- a/packages/material-ui-system/src/style.test.js +++ b/packages/material-ui-system/src/style.test.js @@ -63,6 +63,37 @@ describe('style', () => { // }); }); + const boxShadow = style({ + prop: 'boxShadow', + themeKey: 'shadows', + }); + + it('should support array theme value', () => { + const output = boxShadow({ + theme: { + shadows: ['none', '0px 1px 3px 0px rgba(0, 0, 0, 0.2)'], + }, + boxShadow: 1, + }); + + assert.deepEqual(output, { + boxShadow: '0px 1px 3px 0px rgba(0, 0, 0, 0.2)', + }); + }); + + it('should fallback to value if theme is an array', () => { + const output = boxShadow({ + theme: { + shadows: ['none'], + }, + boxShadow: '0px 1px 3px 0px rgba(0, 0, 0, 0.2)', + }); + + assert.deepEqual(output, { + boxShadow: '0px 1px 3px 0px rgba(0, 0, 0, 0.2)', + }); + }); + const border = style({ prop: 'border', themeKey: 'borders',