Skip to content

Commit

Permalink
group tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 2, 2019
1 parent 8503d15 commit ed33bcd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
30 changes: 0 additions & 30 deletions packages/material-ui-system/src/shadows.test.js

This file was deleted.

31 changes: 31 additions & 0 deletions packages/material-ui-system/src/style.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ed33bcd

Please sign in to comment.