Skip to content

Commit 2a60169

Browse files
committed
ci: fix multiPage test case
1 parent 05079e3 commit 2a60169

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/@vue/cli-service/__tests__/multiPage.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ test('build w/ multi page', async () => {
9999
expect(index).not.toMatch(/<link [^>]*js\/foo[^>]*\.js rel=preload>/)
100100
expect(index).not.toMatch(/<link [^>]*js\/bar[^>]*\.js rel=preload>/)
101101
// should prefetch async chunk js and css
102-
expect(index).toMatch(/<link [^>]*css\/0\.\w+\.css rel=prefetch>/)
103-
expect(index).toMatch(/<link [^>]*js\/0\.\w+\.js rel=prefetch>/)
102+
expect(index).toMatch(/<link [^>]*css\/chunk-\w+\.\w+\.css rel=prefetch>/)
103+
expect(index).toMatch(/<link [^>]*js\/chunk-\w+\.\w+\.js rel=prefetch>/)
104104
// should load correct page js
105105
expect(index).toMatch(/<script [^>]*src=\/js\/index\.\w+\.js>/)
106106
expect(index).not.toMatch(/<script [^>]*src=\/js\/foo\.\w+\.js>/)
@@ -114,8 +114,8 @@ test('build w/ multi page', async () => {
114114
expect(foo).not.toMatch(/<link [^>]*js\/bar[^>]*\.js rel=preload>/)
115115
// should not prefetch async chunk js and css because it's not used by
116116
// this entry
117-
expect(foo).not.toMatch(/<link [^>]*css\/0\.\w+\.css rel=prefetch>/)
118-
expect(foo).not.toMatch(/<link [^>]*js\/0\.\w+\.js rel=prefetch>/)
117+
expect(foo).not.toMatch(/<link [^>]*css\/chunk-\w+\.\w+\.css rel=prefetch>/)
118+
expect(foo).not.toMatch(/<link [^>]*js\/chunk-\w+\.\w+\.js rel=prefetch>/)
119119
// should load correct page js
120120
expect(foo).not.toMatch(/<script [^>]*src=\/js\/index\.\w+\.js>/)
121121
expect(foo).toMatch(/<script [^>]*src=\/js\/foo\.\w+\.js>/)
@@ -128,8 +128,8 @@ test('build w/ multi page', async () => {
128128
expect(bar).not.toMatch(/<link [^>]*js\/foo[^>]*\.js rel=preload>/)
129129
expect(bar).toMatch(/<link [^>]*js\/bar[^>]*\.js rel=preload>/)
130130
// should prefetch async chunk js and css
131-
expect(bar).toMatch(/<link [^>]*css\/0\.\w+\.css rel=prefetch>/)
132-
expect(bar).toMatch(/<link [^>]*js\/0\.\w+\.js rel=prefetch>/)
131+
expect(bar).toMatch(/<link [^>]*css\/chunk-\w+\.\w+\.css rel=prefetch>/)
132+
expect(bar).toMatch(/<link [^>]*js\/chunk-\w+\.\w+\.js rel=prefetch>/)
133133
// should load correct page js
134134
expect(bar).not.toMatch(/<script [^>]*src=\/js\/index\.\w+\.js>/)
135135
expect(bar).not.toMatch(/<script [^>]*src=\/js\/foo\.\w+\.js>/)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy