vue-jest
vue-jest copied to clipboard
Upgrade TS target to ES6
If a third package exported a ES6 native class, and a class in .vue
file extends it. When calling super
in constructor, get error TypeError: Class constructors cannot be invoked without 'new'
.
Transformed classes (in ES5)) from .vue
files are not compatible with native classes (in ES6) exported by third packages.
ES6 is also vue3 basic environment, so should we upgrade it?
https://github.com/vuejs/vue-jest/blob/master/packages/vue3-jest/lib/utils.js#L116
That would be very useful for me :)
I've also been running into this issue, and it seems the problem is unfortunately more complex than just changing the target
: https://github.com/vuejs/vue-jest/issues/445#issuecomment-1121714802. It is possible to add "downLevelIteratiion": true
to your tsconfig.json
's compilerOptions
, but this will affect your production code as well.
It would be useful for us too.
vue-jest
is incompatible with facing-dev/vue-facing-decorator so we are stuck with deprecated vue-property-decorator
and vue-class-component
.