File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/@vue/cli-plugin-pwa/__tests__ Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ test('pwa', async () => {
30
30
const index = await project . read ( 'dist/index.html' )
31
31
32
32
// should split and preload app.js & vendor.js
33
- expect ( index ) . toMatch ( / < l i n k [ ^ > ] + j s \/ a p p [ ^ > ] + \. j s r e l = p r e l o a d > / )
34
- expect ( index ) . toMatch ( / < l i n k [ ^ > ] + j s \/ c h u n k - v e n d o r s [ ^ > ] + \. j s r e l = p r e l o a d > / )
33
+ expect ( index ) . toMatch ( / < l i n k [ ^ > ] + j s \/ a p p [ ^ > ] + \. j s r e l = p r e l o a d a s = s c r i p t > / )
34
+ expect ( index ) . toMatch ( / < l i n k [ ^ > ] + j s \/ c h u n k - v e n d o r s [ ^ > ] + \. j s r e l = p r e l o a d a s = s c r i p t > / )
35
35
// should preload css
36
- expect ( index ) . toMatch ( / < l i n k [ ^ > ] + a p p [ ^ > ] + \. c s s r e l = p r e l o a d > / )
36
+ expect ( index ) . toMatch ( / < l i n k [ ^ > ] + a p p [ ^ > ] + \. c s s r e l = p r e l o a d a s = s t y l e > / )
37
37
38
38
// PWA specific directives
39
39
expect ( index ) . toMatch ( `<link rel=manifest href=/manifest.json>` )
@@ -66,6 +66,10 @@ test('pwa', async () => {
66
66
} )
67
67
68
68
afterAll ( async ( ) => {
69
- await browser . close ( )
70
- server . close ( )
69
+ if ( browser ) {
70
+ await browser . close ( )
71
+ }
72
+ if ( server ) {
73
+ server . close ( )
74
+ }
71
75
} )
You can’t perform that action at this time.
0 commit comments