mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-30 16:59:31 -05:00
test: fix tests after vendor chunk change
This commit is contained in:
@@ -42,7 +42,7 @@ beforeAll(async () => {
|
||||
test('dep from node_modules should not been transpiled', async () => {
|
||||
const { stdout } = await project.run('vue-cli-service build')
|
||||
|
||||
let $vendorjs = stdout.match(/(js\/vendors~app\.[^.]+\.js)/)[1]
|
||||
let $vendorjs = stdout.match(/(js\/chunk-vendors\.[^.]+\.js)/)[1]
|
||||
|
||||
$vendorjs = `dist/${$vendorjs}`
|
||||
$vendorjs = await project.read($vendorjs)
|
||||
@@ -58,7 +58,7 @@ test('dep from node_modules should been transpiled', async () => {
|
||||
|
||||
const { stdout } = await project.run('vue-cli-service build')
|
||||
|
||||
let $vendorjs = stdout.match(/(js\/vendors~app\.[^.]+\.js)/)[1]
|
||||
let $vendorjs = stdout.match(/(js\/chunk-vendors\.[^.]+\.js)/)[1]
|
||||
|
||||
$vendorjs = `dist/${$vendorjs}`
|
||||
$vendorjs = await project.read($vendorjs)
|
||||
|
||||
@@ -31,7 +31,7 @@ test('pwa', async () => {
|
||||
|
||||
// should split and preload app.js & vendor.js
|
||||
expect(index).toMatch(/<link [^>]+js\/app[^>]+\.js rel=preload>/)
|
||||
expect(index).toMatch(/<link [^>]+js\/vendors~app[^>]+\.js rel=preload>/)
|
||||
expect(index).toMatch(/<link [^>]+js\/chunk-vendors[^>]+\.js rel=preload>/)
|
||||
// should preload css
|
||||
expect(index).toMatch(/<link [^>]+app[^>]+\.css rel=preload>/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user