@@ -241,17 +241,17 @@ describe('production', () => {
241
241
const main = await fs . readFile ( path . join ( env . tmp . path , 'dist' , roots [ 2 ] ) , 'utf8' ) ;
242
242
243
243
// https://cdn.example.com/assets/math.d41e7373.css
244
- expect ( math . includes ( `("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ) . toBe ( true ) ;
245
- expect ( math . includes ( `import("./${ chunks [ 0 ] } ")` ) ) . toBe ( true ) ;
244
+ expect ( math ) . toMatch ( `("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ;
245
+ expect ( math ) . toMatch ( `import("./${ chunks [ 0 ] } ")` ) ;
246
246
247
247
// (preload) https://cdn.example.com/assets/math.d41e7373.css
248
- expect ( main . includes ( `$w_s$("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ) . toBe ( true ) ;
248
+ expect ( main ) . toMatch ( `$w_s$("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ;
249
249
250
250
// HTML stylesheet: https://cdn.example.com/assets/index.0544f0a6.css
251
- expect ( html . includes ( `href="https://cdn.example.com/assets/${ assets [ 0 ] } "` ) ) . toBe ( true ) ;
251
+ expect ( html ) . toMatch ( `href="https://cdn.example.com/assets/${ assets [ 0 ] } "` ) ;
252
252
253
253
// HTML script: https://cdn.example.com/assets/index.0544f0a6.css
254
- expect ( html . includes ( `src="https://cdn.example.com/${ roots [ 2 ] } "` ) ) . toBe ( true ) ;
254
+ expect ( html ) . toMatch ( `src="https://cdn.example.com/${ roots [ 2 ] } "` ) ;
255
255
} ) ;
256
256
257
257
it ( 'should respect `config.publicPath` value (ts)' , async ( ) => {
@@ -278,17 +278,17 @@ describe('production', () => {
278
278
const main = await fs . readFile ( path . join ( env . tmp . path , 'dist' , roots [ 2 ] ) , 'utf8' ) ;
279
279
280
280
// https://cdn.example.com/assets/math.d41e7373.css
281
- expect ( math . includes ( `("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ) . toBe ( true ) ;
282
- expect ( math . includes ( `import("./${ chunks [ 0 ] } ")` ) ) . toBe ( true ) ;
281
+ expect ( math ) . toMatch ( `("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ;
282
+ expect ( math ) . toMatch ( `import("./${ chunks [ 0 ] } ")` ) ;
283
283
284
284
// (preload) https://cdn.example.com/assets/math.d41e7373.css
285
- expect ( main . includes ( `$w_s$("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ) . toBe ( true ) ;
285
+ expect ( main ) . toMatch ( `$w_s$("https://cdn.example.com/assets/${ assets [ 1 ] } ")` ) ;
286
286
287
287
// HTML stylesheet: https://cdn.example.com/assets/index.0544f0a6.css
288
- expect ( html . includes ( `href="https://cdn.example.com/assets/${ assets [ 0 ] } "` ) ) . toBe ( true ) ;
288
+ expect ( html ) . toMatch ( `href="https://cdn.example.com/assets/${ assets [ 0 ] } "` ) ;
289
289
290
290
// HTML script: https://cdn.example.com/assets/index.0544f0a6.css
291
- expect ( html . includes ( `src="https://cdn.example.com/${ roots [ 2 ] } "` ) ) . toBe ( true ) ;
291
+ expect ( html ) . toMatch ( `src="https://cdn.example.com/${ roots [ 2 ] } "` ) ;
292
292
} ) ;
293
293
} ) ;
294
294
0 commit comments