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 () => {
3030 const index = await project . read ( 'dist/index.html' )
3131
3232 // 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 > / )
3535 // 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 > / )
3737
3838 // PWA specific directives
3939 expect ( index ) . toMatch ( `<link rel=manifest href=/manifest.json>` )
@@ -66,6 +66,10 @@ test('pwa', async () => {
6666} )
6767
6868afterAll ( async ( ) => {
69- await browser . close ( )
70- server . close ( )
69+ if ( browser ) {
70+ await browser . close ( )
71+ }
72+ if ( server ) {
73+ server . close ( )
74+ }
7175} )
You can’t perform that action at this time.
0 commit comments