File tree Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Original file line number Diff line number Diff line change @@ -655,3 +655,73 @@ test('theme values in the extend section can extend values that are depended on
655
655
} ,
656
656
} )
657
657
} )
658
+
659
+ test ( 'theme values in the extend section are not deeply merged' , ( ) => {
660
+ const userConfig = {
661
+ theme : {
662
+ extend : {
663
+ fonts : {
664
+ sans : [
665
+ 'Comic Sans' ,
666
+ ] ,
667
+ }
668
+ } ,
669
+ } ,
670
+ }
671
+
672
+ const defaultConfig = {
673
+ prefix : '-' ,
674
+ important : false ,
675
+ separator : ':' ,
676
+ theme : {
677
+ fonts : {
678
+ sans : [
679
+ 'system-ui' ,
680
+ 'Helvetica Neue' ,
681
+ 'sans-serif' ,
682
+ ] ,
683
+ serif : [
684
+ 'Constantia' ,
685
+ 'Georgia' ,
686
+ 'serif' ,
687
+ ] ,
688
+ mono : [
689
+ 'Menlo' ,
690
+ 'Courier New' ,
691
+ 'monospace' ,
692
+ ] ,
693
+ } ,
694
+ } ,
695
+ variants : {
696
+ fonts : [ 'responsive' ] ,
697
+ } ,
698
+ }
699
+
700
+ const result = resolveConfig ( [ userConfig , defaultConfig ] )
701
+
702
+ expect ( result ) . toEqual ( {
703
+ prefix : '-' ,
704
+ important : false ,
705
+ separator : ':' ,
706
+ theme : {
707
+ fonts : {
708
+ sans : [
709
+ 'Comic Sans' ,
710
+ ] ,
711
+ serif : [
712
+ 'Constantia' ,
713
+ 'Georgia' ,
714
+ 'serif' ,
715
+ ] ,
716
+ mono : [
717
+ 'Menlo' ,
718
+ 'Courier New' ,
719
+ 'monospace' ,
720
+ ] ,
721
+ } ,
722
+ } ,
723
+ variants : {
724
+ fonts : [ 'responsive' ] ,
725
+ } ,
726
+ } )
727
+ } )
You can’t perform that action at this time.
0 commit comments