Skip to content

Commit

Permalink
test(compiler-sfc): add assertion for template functional (#11557)
Browse files Browse the repository at this point in the history
  • Loading branch information
Disservin committed Aug 8, 2024
1 parent f8ce86b commit c6841bd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/compiler-sfc/__tests__/parse.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
)
})
})
})

0 comments on commit c6841bd

Please sign in to comment.