Test that container screens can just be an array

This commit is contained in:
Adam Wathan 2018-03-13 14:07:05 -04:00
parent 2cc9b99765
commit cfb676acd7

View File

@ -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: [