Skip to content

Commit 805a4ce

Browse files
committed
test: add test for modern mode build result
1 parent e0983f4 commit 805a4ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ test('modern mode', async () => {
2222
expect(files.some(f => /^chunk-vendors\.\w{8}\.js$/.test(f))).toBe(true)
2323
expect(files.some(f => /^chunk-vendors-legacy\.\w{8}\.js$/.test(f))).toBe(true)
2424

25+
// arrow function should be reserved in the modern build
26+
const app = await project.read(`dist/js/${files.find(f => /^app\.\w{8}\.js$/.test(f))}`)
27+
expect(app).toMatch(/=>/)
28+
2529
// assert correct asset links
2630
const index = await project.read('dist/index.html')
2731

0 commit comments

Comments
 (0)