@@ -41,16 +41,16 @@ test('/about', async () => {
41
41
if ( isBuild ) {
42
42
// assert correct preload directive generation for async chunks and CSS
43
43
expect ( aboutHtml ) . not . toMatch (
44
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - \w { 8 } \. j s " / ,
44
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - [ - \w ] { 8 } \. j s " / ,
45
45
)
46
46
expect ( aboutHtml ) . not . toMatch (
47
- / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - \w { 8 } \. c s s " / ,
47
+ / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - [ - \w ] { 8 } \. c s s " / ,
48
48
)
49
49
expect ( aboutHtml ) . toMatch (
50
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - \w { 8 } \. j s " / ,
50
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - [ - \w ] { 8 } \. j s " / ,
51
51
)
52
52
expect ( aboutHtml ) . toMatch (
53
- / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - \w { 8 } \. c s s " / ,
53
+ / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - [ - \w ] { 8 } \. c s s " / ,
54
54
)
55
55
}
56
56
} )
@@ -72,13 +72,13 @@ test('/external', async () => {
72
72
if ( isBuild ) {
73
73
// assert correct preload directive generation for async chunks and CSS
74
74
expect ( externalHtml ) . not . toMatch (
75
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - \w { 8 } \. j s " / ,
75
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - [ - \w ] { 8 } \. j s " / ,
76
76
)
77
77
expect ( externalHtml ) . not . toMatch (
78
- / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - \w { 8 } \. c s s " / ,
78
+ / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - [ - \w ] { 8 } \. c s s " / ,
79
79
)
80
80
expect ( externalHtml ) . toMatch (
81
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ E x t e r n a l - \w { 8 } \. j s " / ,
81
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ E x t e r n a l - [ - \w ] { 8 } \. j s " / ,
82
82
)
83
83
}
84
84
} )
@@ -97,23 +97,23 @@ test('/', async () => {
97
97
if ( isBuild ) {
98
98
// assert correct preload directive generation for async chunks and CSS
99
99
expect ( html ) . toMatch (
100
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - \w { 8 } \. j s " / ,
100
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - [ - \w ] { 8 } \. j s " / ,
101
101
)
102
102
expect ( html ) . toMatch (
103
- / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - \w { 8 } \. c s s " / ,
103
+ / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ H o m e - [ - \w ] { 8 } \. c s s " / ,
104
104
)
105
105
// JSX component preload registration
106
106
expect ( html ) . toMatch (
107
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ F o o - \w { 8 } \. j s " / ,
107
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ F o o - [ - \w ] { 8 } \. j s " / ,
108
108
)
109
109
expect ( html ) . toMatch (
110
- / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ F o o - \w { 8 } \. c s s " / ,
110
+ / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ F o o - [ - \w ] { 8 } \. c s s " / ,
111
111
)
112
112
expect ( html ) . not . toMatch (
113
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - \w { 8 } \. j s " / ,
113
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - [ - \w ] { 8 } \. j s " / ,
114
114
)
115
115
expect ( html ) . not . toMatch (
116
- / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - \w { 8 } \. c s s " / ,
116
+ / l i n k r e l = " s t y l e s h e e t " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ A b o u t - [ - \w ] { 8 } \. c s s " / ,
117
117
)
118
118
}
119
119
} )
@@ -139,7 +139,7 @@ test('asset', async () => {
139
139
} )
140
140
const img = await page . $ ( 'img' )
141
141
expect ( await img . getAttribute ( 'src' ) ) . toMatch (
142
- isBuild ? / \/ t e s t \/ a s s e t s \/ l o g o - \w { 8 } \. p n g / : '/src/assets/logo.png' ,
142
+ isBuild ? / \/ t e s t \/ a s s e t s \/ l o g o - [ - \w ] { 8 } \. p n g / : '/src/assets/logo.png' ,
143
143
)
144
144
} )
145
145
@@ -200,7 +200,7 @@ test.runIf(isBuild)('dynamic css file should be preloaded', async () => {
200
200
await page . goto ( url )
201
201
const homeHtml = await ( await fetch ( url ) ) . text ( )
202
202
const re =
203
- / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ ( H o m e - \w { 8 } \. j s ) " /
203
+ / l i n k r e l = " m o d u l e p r e l o a d " .* ?h r e f = " \/ t e s t \/ a s s e t s \/ ( H o m e - [ - \w ] { 8 } \. j s ) " /
204
204
const filename = re . exec ( homeHtml ) [ 1 ]
205
205
const manifest = (
206
206
await import (
0 commit comments