@@ -2,66 +2,66 @@ import mergeConfigWithDefaults from '../src/util/mergeConfigWithDefaults'
22
33test ( 'missing top level keys are pulled from the default config' , ( ) => {
44 const userConfig = {
5- colors : { red : '#ff0000' } ,
6- modules : { } ,
7- options : { } ,
5+ colors : { red : '#ff0000' } ,
6+ modules : { } ,
7+ options : { } ,
88 }
99
1010 const defaultConfig = {
11- colors : { green : '#00ff00' } ,
11+ colors : { green : '#00ff00' } ,
1212 screens : {
13- sm : '576px'
13+ sm : '576px' ,
1414 } ,
15- modules : { } ,
16- options : { } ,
15+ modules : { } ,
16+ options : { } ,
1717 }
1818
1919 const result = mergeConfigWithDefaults ( userConfig , defaultConfig )
2020
2121 expect ( result ) . toEqual ( {
22- colors : { red : '#ff0000' } ,
22+ colors : { red : '#ff0000' } ,
2323 screens : {
24- sm : '576px'
24+ sm : '576px' ,
2525 } ,
26- modules : { } ,
27- options : { } ,
26+ modules : { } ,
27+ options : { } ,
2828 } )
2929} )
3030
3131test ( 'user modules are merged with default modules' , ( ) => {
3232 const userConfig = {
33- modules : { flexbox : false } ,
34- options : { } ,
33+ modules : { flexbox : false } ,
34+ options : { } ,
3535 }
3636
3737 const defaultConfig = {
38- modules : {
38+ modules : {
3939 flexbox : [ 'responsive' ] ,
4040 textAlign : [ 'responsive' ] ,
4141 } ,
42- options : { } ,
42+ options : { } ,
4343 }
4444
4545 const result = mergeConfigWithDefaults ( userConfig , defaultConfig )
4646
4747 expect ( result ) . toEqual ( {
48- modules : {
48+ modules : {
4949 flexbox : false ,
5050 textAlign : [ 'responsive' ] ,
5151 } ,
52- options : { } ,
52+ options : { } ,
5353 } )
5454} )
5555
5656test ( 'user options are merged with default options' , ( ) => {
5757 const userConfig = {
58- modules : { } ,
59- options : { prefix : 'tw-' } ,
58+ modules : { } ,
59+ options : { prefix : 'tw-' } ,
6060 }
6161
6262 const defaultConfig = {
63- modules : { } ,
64- options : {
63+ modules : { } ,
64+ options : {
6565 prefix : '-' ,
6666 important : false ,
6767 } ,
@@ -70,8 +70,8 @@ test('user options are merged with default options', () => {
7070 const result = mergeConfigWithDefaults ( userConfig , defaultConfig )
7171
7272 expect ( result ) . toEqual ( {
73- modules : { } ,
74- options : {
73+ modules : { } ,
74+ options : {
7575 prefix : 'tw-' ,
7676 important : false ,
7777 } ,
0 commit comments