Skip to content

Commit

Permalink
Test that container screens can just be an array
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Mar 13, 2018
1 parent 2cc9b99 commit cfb676a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions __tests__/containerPlugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@ test('screens can be specified explicitly', () => {
`)
})

test('screens can be an array', () => {
const [components] = processPluginsWithValidConfig({
plugins: [
container({
screens: [
'400px',
'500px',
],
}),
],
})

expect(css(components)).toMatchCss(`
.container { width: 100% }
@media (min-width: 400px) {
.container { max-width: 400px }
}
@media (min-width: 500px) {
.container { max-width: 500px }
}
`)
})

test('the container can be centered by default', () => {
const [components] = processPluginsWithValidConfig({
plugins: [
Expand Down

0 comments on commit cfb676a

Please sign in to comment.