@@ -21,7 +21,7 @@ test('prefix key overrides default prefix', () => {
2121 } ,
2222 }
2323
24- const result = resolveConfig ( [ userConfig , defaultConfig ] )
24+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
2525
2626 expect ( result ) . toEqual ( {
2727 prefix : 'tw-' ,
@@ -61,7 +61,7 @@ test('important key overrides default important', () => {
6161 } ,
6262 }
6363
64- const result = resolveConfig ( [ userConfig , defaultConfig ] )
64+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
6565
6666 expect ( result ) . toEqual ( {
6767 prefix : '' ,
@@ -101,7 +101,7 @@ test('important (selector) key overrides default important', () => {
101101 } ,
102102 }
103103
104- const result = resolveConfig ( [ userConfig , defaultConfig ] )
104+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
105105
106106 expect ( result ) . toEqual ( {
107107 prefix : '' ,
@@ -141,7 +141,7 @@ test('separator key overrides default separator', () => {
141141 } ,
142142 }
143143
144- const result = resolveConfig ( [ userConfig , defaultConfig ] )
144+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
145145
146146 expect ( result ) . toEqual ( {
147147 prefix : '' ,
@@ -182,7 +182,13 @@ test('theme key is merged instead of replaced', () => {
182182 'grey-lighter' : '#f1f5f8' ,
183183 } ,
184184 fonts : {
185- sans : [ 'system-ui' , 'BlinkMacSystemFont' , '-apple-system' , 'Roboto' , 'sans-serif' ] ,
185+ sans : [
186+ 'system-ui' ,
187+ 'BlinkMacSystemFont' ,
188+ '-apple-system' ,
189+ 'Roboto' ,
190+ 'sans-serif' ,
191+ ] ,
186192 serif : [ 'Constantia' , 'Lucida Bright' , 'Georgia' , 'serif' ] ,
187193 } ,
188194 screens : {
@@ -198,7 +204,7 @@ test('theme key is merged instead of replaced', () => {
198204 } ,
199205 }
200206
201- const result = resolveConfig ( [ userConfig , defaultConfig ] )
207+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
202208
203209 expect ( result ) . toEqual ( {
204210 prefix : '-' ,
@@ -213,7 +219,13 @@ test('theme key is merged instead of replaced', () => {
213219 'grey-lighter' : '#f1f5f8' ,
214220 } ,
215221 fonts : {
216- sans : [ 'system-ui' , 'BlinkMacSystemFont' , '-apple-system' , 'Roboto' , 'sans-serif' ] ,
222+ sans : [
223+ 'system-ui' ,
224+ 'BlinkMacSystemFont' ,
225+ '-apple-system' ,
226+ 'Roboto' ,
227+ 'sans-serif' ,
228+ ] ,
217229 serif : [ 'Constantia' , 'Lucida Bright' , 'Georgia' , 'serif' ] ,
218230 } ,
219231 screens : {
@@ -249,7 +261,13 @@ test('variants key is merged instead of replaced', () => {
249261 'grey-lighter' : '#f1f5f8' ,
250262 } ,
251263 fonts : {
252- sans : [ 'system-ui' , 'BlinkMacSystemFont' , '-apple-system' , 'Roboto' , 'sans-serif' ] ,
264+ sans : [
265+ 'system-ui' ,
266+ 'BlinkMacSystemFont' ,
267+ '-apple-system' ,
268+ 'Roboto' ,
269+ 'sans-serif' ,
270+ ] ,
253271 serif : [ 'Constantia' , 'Lucida Bright' , 'Georgia' , 'serif' ] ,
254272 } ,
255273 screens : {
@@ -267,7 +285,7 @@ test('variants key is merged instead of replaced', () => {
267285 } ,
268286 }
269287
270- const result = resolveConfig ( [ userConfig , defaultConfig ] )
288+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
271289
272290 expect ( result ) . toEqual ( {
273291 prefix : '-' ,
@@ -282,7 +300,13 @@ test('variants key is merged instead of replaced', () => {
282300 'grey-lighter' : '#f1f5f8' ,
283301 } ,
284302 fonts : {
285- sans : [ 'system-ui' , 'BlinkMacSystemFont' , '-apple-system' , 'Roboto' , 'sans-serif' ] ,
303+ sans : [
304+ 'system-ui' ,
305+ 'BlinkMacSystemFont' ,
306+ '-apple-system' ,
307+ 'Roboto' ,
308+ 'sans-serif' ,
309+ ] ,
286310 serif : [ 'Constantia' , 'Lucida Bright' , 'Georgia' , 'serif' ] ,
287311 } ,
288312 screens : {
@@ -319,7 +343,13 @@ test('a global variants list replaces the default', () => {
319343 'grey-lighter' : '#f1f5f8' ,
320344 } ,
321345 fonts : {
322- sans : [ 'system-ui' , 'BlinkMacSystemFont' , '-apple-system' , 'Roboto' , 'sans-serif' ] ,
346+ sans : [
347+ 'system-ui' ,
348+ 'BlinkMacSystemFont' ,
349+ '-apple-system' ,
350+ 'Roboto' ,
351+ 'sans-serif' ,
352+ ] ,
323353 serif : [ 'Constantia' , 'Lucida Bright' , 'Georgia' , 'serif' ] ,
324354 } ,
325355 screens : {
@@ -337,7 +367,7 @@ test('a global variants list replaces the default', () => {
337367 } ,
338368 }
339369
340- const result = resolveConfig ( [ userConfig , defaultConfig ] )
370+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
341371
342372 expect ( result ) . toEqual ( {
343373 prefix : '-' ,
@@ -352,7 +382,13 @@ test('a global variants list replaces the default', () => {
352382 'grey-lighter' : '#f1f5f8' ,
353383 } ,
354384 fonts : {
355- sans : [ 'system-ui' , 'BlinkMacSystemFont' , '-apple-system' , 'Roboto' , 'sans-serif' ] ,
385+ sans : [
386+ 'system-ui' ,
387+ 'BlinkMacSystemFont' ,
388+ '-apple-system' ,
389+ 'Roboto' ,
390+ 'sans-serif' ,
391+ ] ,
356392 serif : [ 'Constantia' , 'Lucida Bright' , 'Georgia' , 'serif' ] ,
357393 } ,
358394 screens : {
@@ -385,7 +421,7 @@ test('missing top level keys are pulled from the default config', () => {
385421 } ,
386422 }
387423
388- const result = resolveConfig ( [ userConfig , defaultConfig ] )
424+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
389425
390426 expect ( result ) . toEqual ( {
391427 prefix : '-' ,
@@ -435,7 +471,7 @@ test('functions in the default theme section are lazily evaluated', () => {
435471 } ,
436472 }
437473
438- const result = resolveConfig ( [ userConfig , defaultConfig ] )
474+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
439475
440476 expect ( result ) . toEqual ( {
441477 prefix : '-' ,
@@ -503,7 +539,7 @@ test('functions in the user theme section are lazily evaluated', () => {
503539 } ,
504540 }
505541
506- const result = resolveConfig ( [ userConfig , defaultConfig ] )
542+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
507543
508544 expect ( result ) . toEqual ( {
509545 prefix : '-' ,
@@ -573,7 +609,7 @@ test('theme values in the extend section extend the existing theme', () => {
573609 } ,
574610 }
575611
576- const result = resolveConfig ( [ userConfig , defaultConfig ] )
612+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
577613
578614 expect ( result ) . toEqual ( {
579615 prefix : '-' ,
@@ -657,7 +693,7 @@ test('theme values in the extend section extend the user theme', () => {
657693 } ,
658694 }
659695
660- const result = resolveConfig ( [ userConfig , defaultConfig ] )
696+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
661697
662698 expect ( result ) . toEqual ( {
663699 prefix : '-' ,
@@ -729,7 +765,7 @@ test('theme values in the extend section can extend values that are depended on
729765 } ,
730766 }
731767
732- const result = resolveConfig ( [ userConfig , defaultConfig ] )
768+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
733769
734770 expect ( result ) . toEqual ( {
735771 prefix : '-' ,
@@ -787,7 +823,7 @@ test('theme values in the extend section are not deeply merged', () => {
787823 } ,
788824 }
789825
790- const result = resolveConfig ( [ userConfig , defaultConfig ] )
826+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
791827
792828 expect ( result ) . toEqual ( {
793829 prefix : '-' ,
@@ -837,7 +873,7 @@ test('the theme function can use a default value if the key is missing', () => {
837873 } ,
838874 }
839875
840- const result = resolveConfig ( [ userConfig , defaultConfig ] )
876+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
841877
842878 expect ( result ) . toEqual ( {
843879 prefix : '-' ,
@@ -894,7 +930,7 @@ test('the theme function can resolve function values', () => {
894930 } ,
895931 }
896932
897- const result = resolveConfig ( [ userConfig , defaultConfig ] )
933+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
898934
899935 expect ( result ) . toEqual ( {
900936 prefix : '-' ,
@@ -962,7 +998,7 @@ test('the theme function can resolve deep function values', () => {
962998 } ,
963999 }
9641000
965- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1001+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
9661002
9671003 expect ( result ) . toEqual ( {
9681004 prefix : '-' ,
@@ -1027,7 +1063,7 @@ test('theme values in the extend section are lazily evaluated', () => {
10271063 } ,
10281064 }
10291065
1030- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1066+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
10311067
10321068 expect ( result ) . toEqual ( {
10331069 prefix : '-' ,
@@ -1092,7 +1128,7 @@ test('lazily evaluated values have access to the config utils', () => {
10921128 variants : { } ,
10931129 }
10941130
1095- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1131+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
10961132
10971133 expect ( result ) . toEqual ( {
10981134 prefix : '-' ,
@@ -1180,7 +1216,7 @@ test('the original theme is not mutated', () => {
11801216 } ,
11811217 }
11821218
1183- resolveConfig ( [ userConfig , defaultConfig ] )
1219+ resolveConfig ( [ defaultConfig , userConfig ] )
11841220
11851221 expect ( userConfig ) . toEqual ( {
11861222 theme : {
@@ -1223,7 +1259,7 @@ test('custom properties are multiplied by -1 for negative values', () => {
12231259 variants : { } ,
12241260 }
12251261
1226- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1262+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
12271263
12281264 expect ( result ) . toEqual ( {
12291265 prefix : '-' ,
@@ -1341,7 +1377,12 @@ test('more than two config objects can be resolved', () => {
13411377 } ,
13421378 }
13431379
1344- const result = resolveConfig ( [ firstConfig , secondConfig , thirdConfig , defaultConfig ] )
1380+ const result = resolveConfig ( [
1381+ defaultConfig ,
1382+ thirdConfig ,
1383+ secondConfig ,
1384+ firstConfig ,
1385+ ] )
13451386
13461387 expect ( result ) . toEqual ( {
13471388 prefix : '-' ,
@@ -1412,7 +1453,7 @@ test('plugin config modifications are applied', () => {
14121453 } ,
14131454 }
14141455
1415- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1456+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
14161457
14171458 expect ( result ) . toEqual ( {
14181459 prefix : 'tw-' ,
@@ -1460,7 +1501,7 @@ test('user config takes precedence over plugin config modifications', () => {
14601501 } ,
14611502 }
14621503
1463- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1504+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
14641505
14651506 expect ( result ) . toEqual ( {
14661507 prefix : 'user-' ,
@@ -1520,7 +1561,7 @@ test('plugin config can register plugins that also have config', () => {
15201561 } ,
15211562 }
15221563
1523- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1564+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
15241565
15251566 expect ( result ) . toEqual ( {
15261567 prefix : 'tw-' ,
@@ -1575,7 +1616,7 @@ test('plugin configs take precedence over plugin configs registered by that plug
15751616 } ,
15761617 }
15771618
1578- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1619+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
15791620
15801621 expect ( result ) . toEqual ( {
15811622 prefix : 'outer-' ,
@@ -1640,7 +1681,7 @@ test('plugin theme extensions are added even if user overrides top-level theme c
16401681 } ,
16411682 }
16421683
1643- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1684+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
16441685
16451686 expect ( result ) . toEqual ( {
16461687 prefix : '' ,
@@ -1711,7 +1752,7 @@ test('user theme extensions take precedence over plugin theme extensions with th
17111752 } ,
17121753 }
17131754
1714- const result = resolveConfig ( [ userConfig , defaultConfig ] )
1755+ const result = resolveConfig ( [ defaultConfig , userConfig ] )
17151756
17161757 expect ( result ) . toEqual ( {
17171758 prefix : '' ,
0 commit comments