vuejs / vue-jest

Jest Vue transformer
MIT License
746 stars 157 forks source link

feat: support TS in templates for @vue/vue3-jest #394

Closed cexbrayat closed 2 years ago

cexbrayat commented 3 years ago

Vue 3.2.13 introduced the support of TS expressions in templates, with a new isTs option of the compiler. (See the relevant commit)

vue-loader and vite chose to enable this by default if the script uses TS:

This commit enables the same behavior in vue-jest: if the script is using TS, then the isTs option is passed to the compiler. TS developers won't have to worry about setting the options themselves, making it coherent with what vue-loader and vite do.