-
Notifications
You must be signed in to change notification settings - Fork 61
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
Make @quasar/quasar-app-extension-testing-unit-jest support Quasar 2.16.0+ #373
Comments
@pierre-jochem FYI |
I'd say we need to update that, feel free to send a PR |
@antonio-masotti what happens if you remove the mapper altogether? |
Not sure I understand what you mean The mapper in our own project is needed to resolve paths with alias (e.g. This is the line causing the error. Removing our mapper would hinder the tests to resolve the imports that use aliases. Removing that line would of course break many if not all quasar-related functionalities. |
@antonio-masotti @IlCallo
Any ideas? Once I get this straightened, I'd be happy to submit a PR. |
@whoacowboy What you described in #375 is what I meant with
|
@antonio-masotti Indeed it did break everything. And now I am finally able to read your last sentence. I tried linking to
I need to come up with some sort of work around for this for our current project. I'll post back what I find or which way we go. |
In our case we blocked quasar to 2.15.4 for the moment, which is suboptimal. @IlCallo Is there any chance that quasar reintroduces the ESM module? I don't see any disadvantages in having it both compiled as Universal module (UMD) as it is now and as ESM module, especially since ESM are the de facto standard in the JS / TS Ecosystem. Reintroducing the file, would immediately solve the issue. Otherwise, we will have to see how to instruct jest to work with UMD modules, which maybe quite difficult, if possible at all. |
We solved the issue the same way, locked quasar to 2.12.3. @IlCallo I agree it would be really helpful to reintroduce the ESM module. |
Software version
OS: doesn't matter (tested on MacOS and Ubuntu 21, 22)
Node: v18 and v20
NPM: 10.2.3
Any other software related to your bug:
"quasar": "^2.16.2"
"@quasar/app-webpack": "^4.0.0-beta.7"
"@quasar/quasar-app-extension-testing-unit-jest": "^3.0.0-beta.7"
What did you get as the error?
@quasar/app-webpack": "^4.0.0-beta.13"
and"@quasar/quasar-app-extension-testing-unit-jest": "^3.0.0-beta.7"
don't seem to be compatible with the changes introduced inquasar
from v.2.16.0The
@quasar/quasar-app-extension-testing-unit-jest/jest-preset.mjs
searches in the moduleNameMapper for a filequasar/dist/quasar.esm.prod.js
which is not thereas result the
installQuasarPlugin()
fails in the tests:What were you expecting?
to be able to run the tests
Reproduction URL
https://stackblitz.com/edit/quasarframework-webpack-8elbvr?file=jest.config.mjs
Are the test extensions not yet compatible with Quasar 2.16.0+ or am I using the wrong package versions?
The text was updated successfully, but these errors were encountered: