Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing-unit-jest@alpha still not compatible with Vue 3/Typescript #175

Closed
jousi592 opened this issue Aug 3, 2021 · 1 comment
Closed

Comments

@jousi592
Copy link

jousi592 commented Aug 3, 2021

Software version

OS: MacOs 11.2.3
Node: 14.16.0
NPM: 7.20.1
Any other software related to your bug: Jest, Typescript, Vue 3

What did you get as the error?

After adding the new @quasar/testing-unit-jest@alpha package via quasar ext add @quasar/testing-unit-jest@alpha and running yarn test:unit:ci I get:
Module vue-jest in the transform option was not found. (Would have expected you use vue3-jest, since thats whats recommended by Vue-jest to be used with Vue3).

Then when I install latest vue-jest, I get:
Error: Cannot find module 'vue-template-compiler' Which makes sense since thats not in Vue 3.

What were you expecting?

No errors and working example test.

What steps did you take, to get the error?

When I rewrite the jest.config.js file to use vue3-jest the tests start running, but your example test fails immediately on:
test/jest/__tests__/MyButton.spec.ts:22:23 - error TS2304: Cannot find name 'HTMLElement'.

@IlCallo
Copy link
Member

IlCallo commented Aug 10, 2021

vue-jest is currently pretty unstable, as it's going through many changes in how versioning is handled

Since the new version is still in the making and won't support Jest 26, we are stuck into "vue-jest": "^5.0.0-alpha.10" to avoid the breaking changes (there are quite a bit from Jest 26 to Jest 27)

We will support Jest 27 in a future major release, and stick to "vue-jest": "^5.0.0-alpha.10" until then

I just re-tested the AE into a Vue3+TS project and it works fine, can you provide a repro?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants