@@ -6,6 +6,7 @@ const sourceShorthand = '<style>.red { color: red; }</style>\n<span class="$.red
6
6
test ( 'Generate CSS Modules from HTML attributes, Replace CSS className' , async ( ) => {
7
7
const output = await compiler ( {
8
8
source,
9
+ } , {
9
10
localIdentName : '[local]-123456' ,
10
11
} ) ;
11
12
@@ -14,6 +15,7 @@ test('Generate CSS Modules from HTML attributes, Replace CSS className', async (
14
15
test ( '[Shorthand] Generate CSS Modules from HTML attributes, Replace CSS className' , async ( ) => {
15
16
const output = await compiler ( {
16
17
source : sourceShorthand ,
18
+ } , {
17
19
localIdentName : '[local]-123456' ,
18
20
} ) ;
19
21
@@ -23,13 +25,15 @@ test('[Shorthand] Generate CSS Modules from HTML attributes, Replace CSS classNa
23
25
test ( 'Avoid generated class to start with a non character' , async ( ) => {
24
26
const output = await compiler ( {
25
27
source,
28
+ } , {
26
29
localIdentName : '1[local]' ,
27
30
} ) ;
28
31
expect ( output ) . toBe ( '<style>:global(._1red) { color: red; }</style>\n<span class="_1red">Red</span>' ) ;
29
32
} ) ;
30
33
test ( '[Shorthand] Avoid generated class to start with a non character' , async ( ) => {
31
34
const output = await compiler ( {
32
35
source : sourceShorthand ,
36
+ } , {
33
37
localIdentName : '1[local]' ,
34
38
} ) ;
35
39
expect ( output ) . toBe ( '<style>:global(._1red) { color: red; }</style>\n<span class="_1red">Red</span>' ) ;
@@ -38,13 +42,15 @@ test('[Shorthand] Avoid generated class to start with a non character', async ()
38
42
test ( 'Avoid generated class to end with a hyphen' , async ( ) => {
39
43
const output = await compiler ( {
40
44
source,
45
+ } , {
41
46
localIdentName : '[local]-' ,
42
47
} ) ;
43
48
expect ( output ) . toBe ( '<style>:global(.red) { color: red; }</style>\n<span class="red">Red</span>' ) ;
44
49
} ) ;
45
50
test ( '[Shorthand] Avoid generated class to end with a hyphen' , async ( ) => {
46
51
const output = await compiler ( {
47
52
source : sourceShorthand ,
53
+ } , {
48
54
localIdentName : '[local]-' ,
49
55
} ) ;
50
56
expect ( output ) . toBe ( '<style>:global(.red) { color: red; }</style>\n<span class="red">Red</span>' ) ;
0 commit comments