mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-13 12:40:18 -05:00
test: add test for modern mode build result
This commit is contained in:
@@ -22,6 +22,10 @@ test('modern mode', async () => {
|
||||
expect(files.some(f => /^chunk-vendors\.\w{8}\.js$/.test(f))).toBe(true)
|
||||
expect(files.some(f => /^chunk-vendors-legacy\.\w{8}\.js$/.test(f))).toBe(true)
|
||||
|
||||
// arrow function should be reserved in the modern build
|
||||
const app = await project.read(`dist/js/${files.find(f => /^app\.\w{8}\.js$/.test(f))}`)
|
||||
expect(app).toMatch(/=>/)
|
||||
|
||||
// assert correct asset links
|
||||
const index = await project.read('dist/index.html')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user