test(compiler-sfc): add assertion for template functional (#11557)

This commit is contained in:
disservin 2024-08-08 15:08:58 +02:00 committed by GitHub
parent f8ce86bad7
commit c6841bdf4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -425,5 +425,15 @@ h1 { color: red }
`At least one <template> or <script> is required in a single file component`,
)
})
test('should throw error if template functional is given', () => {
assertWarning(
parse(`<template functional></template>`).errors,
`<template functional> is no longer supported in Vue 3, since ` +
`functional components no longer have significant performance ` +
`difference from stateful ones. Just use a normal <template> ` +
`instead.`,
)
})
})
})