@@ -41,16 +41,16 @@ test('/about', async () => {
4141 if ( isBuild ) {
4242 // assert correct preload directive generation for async chunks and CSS
4343 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 " / ,
4545 )
4646 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 " / ,
4848 )
4949 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 " / ,
5151 )
5252 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 " / ,
5454 )
5555 }
5656} )
@@ -72,13 +72,13 @@ test('/external', async () => {
7272 if ( isBuild ) {
7373 // assert correct preload directive generation for async chunks and CSS
7474 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 " / ,
7676 )
7777 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 " / ,
7979 )
8080 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 " / ,
8282 )
8383 }
8484} )
@@ -97,23 +97,23 @@ test('/', async () => {
9797 if ( isBuild ) {
9898 // assert correct preload directive generation for async chunks and CSS
9999 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 " / ,
101101 )
102102 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 " / ,
104104 )
105105 // JSX component preload registration
106106 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 " / ,
108108 )
109109 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 " / ,
111111 )
112112 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 " / ,
114114 )
115115 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 " / ,
117117 )
118118 }
119119} )
@@ -139,7 +139,7 @@ test('asset', async () => {
139139 } )
140140 const img = await page . $ ( 'img' )
141141 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' ,
143143 )
144144} )
145145
@@ -200,7 +200,7 @@ test.runIf(isBuild)('dynamic css file should be preloaded', async () => {
200200 await page . goto ( url )
201201 const homeHtml = await ( await fetch ( url ) ) . text ( )
202202 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 ) " /
204204 const filename = re . exec ( homeHtml ) [ 1 ]
205205 const manifest = (
206206 await import (
0 commit comments