Skip to content

Commit cfb676a

Browse files
committed
Test that container screens can just be an array
1 parent 2cc9b99 commit cfb676a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

__tests__/containerPlugin.test.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,29 @@ test('screens can be specified explicitly', () => {
7070
`)
7171
})
7272

73+
test('screens can be an array', () => {
74+
const [components] = processPluginsWithValidConfig({
75+
plugins: [
76+
container({
77+
screens: [
78+
'400px',
79+
'500px',
80+
],
81+
}),
82+
],
83+
})
84+
85+
expect(css(components)).toMatchCss(`
86+
.container { width: 100% }
87+
@media (min-width: 400px) {
88+
.container { max-width: 400px }
89+
}
90+
@media (min-width: 500px) {
91+
.container { max-width: 500px }
92+
}
93+
`)
94+
})
95+
7396
test('the container can be centered by default', () => {
7497
const [components] = processPluginsWithValidConfig({
7598
plugins: [

0 commit comments

Comments
 (0)