Skip to content

Commit 68c3510

Browse files
committed
add missing content object
1 parent 040c422 commit 68c3510

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

tests/resolveConfig.test.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ test('prefix key overrides default prefix', () => {
1010
prefix: '',
1111
important: false,
1212
separator: ':',
13+
content: [],
1314
theme: {
1415
screens: {
1516
mobile: '400px',
@@ -40,6 +41,7 @@ test('important key overrides default important', () => {
4041
prefix: '',
4142
important: false,
4243
separator: ':',
44+
content: [],
4345
theme: {
4446
screens: {
4547
mobile: '400px',
@@ -70,6 +72,7 @@ test('important (selector) key overrides default important', () => {
7072
prefix: '',
7173
important: false,
7274
separator: ':',
75+
content: [],
7376
theme: {
7477
screens: {
7578
mobile: '400px',
@@ -100,6 +103,7 @@ test('separator key overrides default separator', () => {
100103
prefix: '',
101104
important: false,
102105
separator: ':',
106+
content: [],
103107
theme: {
104108
screens: {
105109
mobile: '400px',
@@ -134,6 +138,7 @@ test('theme key is merged instead of replaced', () => {
134138
prefix: '-',
135139
important: false,
136140
separator: ':',
141+
content: [],
137142
theme: {
138143
colors: {
139144
'grey-darker': '#606f7b',
@@ -197,6 +202,7 @@ test('theme key is deeply merged instead of replaced', () => {
197202
prefix: '-',
198203
important: false,
199204
separator: ':',
205+
content: [],
200206
theme: {
201207
colors: {
202208
grey: {
@@ -235,6 +241,7 @@ test('missing top level keys are pulled from the default config', () => {
235241
prefix: '-',
236242
important: false,
237243
separator: ':',
244+
content: [],
238245
theme: {
239246
colors: { green: '#00ff00' },
240247
screens: {
@@ -273,6 +280,7 @@ test('functions in the default theme section are lazily evaluated', () => {
273280
prefix: '-',
274281
important: false,
275282
separator: ':',
283+
content: [],
276284
theme: {
277285
colors: {
278286
cyan: 'cyan',
@@ -333,6 +341,7 @@ test('functions in the user theme section are lazily evaluated', () => {
333341
prefix: '-',
334342
important: false,
335343
separator: ':',
344+
content: [],
336345
theme: {
337346
colors: {
338347
cyan: 'cyan',
@@ -391,6 +400,7 @@ test('theme values in the extend section extend the existing theme', () => {
391400
prefix: '-',
392401
important: false,
393402
separator: ':',
403+
content: [],
394404
theme: {
395405
colors: {
396406
cyan: 'cyan',
@@ -461,6 +471,7 @@ test('theme values in the extend section extend the user theme', () => {
461471
prefix: '-',
462472
important: false,
463473
separator: ':',
474+
content: [],
464475
theme: {
465476
opacity: {
466477
0: '0',
@@ -535,6 +546,7 @@ test('theme values in the extend section can extend values that are depended on
535546
prefix: '-',
536547
important: false,
537548
separator: ':',
549+
content: [],
538550
theme: {
539551
colors: {
540552
cyan: 'cyan',
@@ -588,6 +600,7 @@ test('theme values in the extend section are not deeply merged when they are sim
588600
prefix: '-',
589601
important: false,
590602
separator: ':',
603+
content: [],
591604
theme: {
592605
fonts: {
593606
sans: ['system-ui', 'Helvetica Neue', 'sans-serif'],
@@ -636,6 +649,7 @@ test('theme values in the extend section are deeply merged, when they are arrays
636649
prefix: '-',
637650
important: false,
638651
separator: ':',
652+
content: [],
639653
theme: {
640654
typography: {
641655
ArrayArray: {
@@ -696,6 +710,7 @@ test('the theme function can use a default value if the key is missing', () => {
696710
prefix: '-',
697711
important: false,
698712
separator: ':',
713+
content: [],
699714
theme: {
700715
colors: {
701716
cyan: 'cyan',
@@ -750,6 +765,7 @@ test('the theme function can resolve function values', () => {
750765
prefix: '-',
751766
important: false,
752767
separator: ':',
768+
content: [],
753769
theme: {
754770
colors: {
755771
red: 'red',
@@ -808,6 +824,7 @@ test('the theme function can resolve deep function values', () => {
808824
prefix: '-',
809825
important: false,
810826
separator: ':',
827+
content: [],
811828
theme: {
812829
spacing: {
813830
0: '0',
@@ -864,6 +881,7 @@ test('theme values in the extend section are lazily evaluated', () => {
864881
prefix: '-',
865882
important: false,
866883
separator: ':',
884+
content: [],
867885
theme: {
868886
colors: {
869887
cyan: 'cyan',
@@ -924,6 +942,7 @@ test('lazily evaluated values have access to the config utils', () => {
924942
prefix: '-',
925943
important: false,
926944
separator: ':',
945+
content: [],
927946
theme: {
928947
spacing: {
929948
1: '1px',
@@ -1010,6 +1029,7 @@ test('the original theme is not mutated', () => {
10101029
prefix: '-',
10111030
important: false,
10121031
separator: ':',
1032+
content: [],
10131033
theme: {
10141034
colors: {
10151035
cyan: 'cyan',
@@ -1058,6 +1078,7 @@ test('custom properties are multiplied by -1 for negative values', () => {
10581078
prefix: '-',
10591079
important: false,
10601080
separator: ':',
1081+
content: [],
10611082
theme: {},
10621083
}
10631084

@@ -1165,6 +1186,7 @@ test('more than two config objects can be resolved', () => {
11651186
prefix: '-',
11661187
important: false,
11671188
separator: ':',
1189+
content: [],
11681190
theme: {
11691191
fontFamily: {
11701192
body: ['Arial', 'sans-serif'],
@@ -1233,6 +1255,7 @@ test('plugin config modifications are applied', () => {
12331255
prefix: '',
12341256
important: false,
12351257
separator: ':',
1258+
content: [],
12361259
theme: {
12371260
screens: {
12381261
mobile: '400px',
@@ -1271,6 +1294,7 @@ test('user config takes precedence over plugin config modifications', () => {
12711294
prefix: '',
12721295
important: false,
12731296
separator: ':',
1297+
content: [],
12741298
theme: {
12751299
screens: {
12761300
mobile: '400px',
@@ -1321,6 +1345,7 @@ test('plugin config can register plugins that also have config', () => {
13211345
prefix: '',
13221346
important: false,
13231347
separator: ':',
1348+
content: [],
13241349
theme: {
13251350
screens: {
13261351
mobile: '400px',
@@ -1366,6 +1391,7 @@ test('plugin configs take precedence over plugin configs registered by that plug
13661391
prefix: '',
13671392
important: false,
13681393
separator: ':',
1394+
content: [],
13691395
theme: {
13701396
screens: {
13711397
mobile: '400px',
@@ -1416,6 +1442,7 @@ test('plugin theme extensions are added even if user overrides top-level theme c
14161442
prefix: '',
14171443
important: false,
14181444
separator: ':',
1445+
content: [],
14191446
theme: {
14201447
width: {
14211448
sm: '1rem',
@@ -1477,6 +1504,7 @@ test('user theme extensions take precedence over plugin theme extensions with th
14771504
prefix: '',
14781505
important: false,
14791506
separator: ':',
1507+
content: [],
14801508
theme: {
14811509
width: {
14821510
sm: '1rem',
@@ -1549,6 +1577,7 @@ test('extensions are applied in the right order', () => {
15491577
}
15501578

15511579
const defaultConfig = {
1580+
content: [],
15521581
theme: {
15531582
colors: {
15541583
grey: {
@@ -1583,6 +1612,7 @@ test('core plugin configuration builds on the default list when starting with an
15831612
prefix: '',
15841613
important: false,
15851614
separator: ':',
1615+
content: [],
15861616
theme: {},
15871617
corePlugins: {},
15881618
}
@@ -1608,6 +1638,7 @@ test('core plugins that are disabled by default can be enabled', () => {
16081638
prefix: '',
16091639
important: false,
16101640
separator: ':',
1641+
content: [],
16111642
theme: {},
16121643
corePlugins: { display: false },
16131644
}
@@ -1631,6 +1662,7 @@ test('core plugin configurations stack', () => {
16311662
prefix: '',
16321663
important: false,
16331664
separator: ':',
1665+
content: [],
16341666
theme: {},
16351667
corePlugins: ['float', 'display', 'padding'],
16361668
}
@@ -1660,6 +1692,7 @@ test('plugins are merged', () => {
16601692
prefix: '',
16611693
important: false,
16621694
separator: ':',
1695+
content: [],
16631696
theme: {},
16641697
}
16651698

@@ -1691,6 +1724,7 @@ test('all helpers can be destructured from the first function argument', () => {
16911724
prefix: '-',
16921725
important: false,
16931726
separator: ':',
1727+
content: [],
16941728
theme: {
16951729
screens: {
16961730
sm: '640px',

0 commit comments

Comments
 (0)