@@ -41,6 +41,29 @@ test.only('options are not required', () => {
41
41
` )
42
42
} )
43
43
44
+ test . only ( 'screens can be passed explicitly' , ( ) => {
45
+ const { components } = processPlugins (
46
+ [ container ( ) ] ,
47
+ config ( {
48
+ theme : {
49
+ container : {
50
+ screens : [ '400px' , '500px' ] ,
51
+ } ,
52
+ } ,
53
+ } )
54
+ )
55
+
56
+ expect ( css ( components ) ) . toMatchCss ( `
57
+ .container { width: 100% }
58
+ @media (min-width: 400px) {
59
+ .container { max-width: 400px }
60
+ }
61
+ @media (min-width: 500px) {
62
+ .container { max-width: 500px }
63
+ }
64
+ ` )
65
+ } )
66
+
44
67
test . only ( 'the container can be centered by default' , ( ) => {
45
68
const { components } = processPlugins (
46
69
[ container ( ) ] ,
@@ -113,6 +136,7 @@ test.only('setting all options at once', () => {
113
136
config ( {
114
137
theme : {
115
138
container : {
139
+ screens : [ '400px' , '500px' ] ,
116
140
center : true ,
117
141
padding : '2rem' ,
118
142
} ,
@@ -128,17 +152,11 @@ test.only('setting all options at once', () => {
128
152
padding-right: 2rem;
129
153
padding-left: 2rem
130
154
}
131
- @media (min-width: 576px ) {
132
- .container { max-width: 576px }
155
+ @media (min-width: 400px ) {
156
+ .container { max-width: 400px }
133
157
}
134
- @media (min-width: 768px) {
135
- .container { max-width: 768px }
136
- }
137
- @media (min-width: 992px) {
138
- .container { max-width: 992px }
139
- }
140
- @media (min-width: 1200px) {
141
- .container { max-width: 1200px }
158
+ @media (min-width: 500px) {
159
+ .container { max-width: 500px }
142
160
}
143
161
` )
144
162
} )
0 commit comments