quasarframework / quasar-testing

Testing Harness App Extensions for the Quasar Framework 2.0+
https://testing.quasar.dev
MIT License
179 stars 66 forks source link

fix: fix compatibility with quasar 2.16.x (fix #373) #377

Closed antonio-masotti closed 4 weeks ago

antonio-masotti commented 1 month ago

What kind of change does this PR introduce? (check at least one)

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

Only compatible with quasar >= 2.16.0, due to changes in the core quasar build modules (esm modules renamed to quasar.client.js. See comment in the issue there

The PR fulfills these requirements:

antonio-masotti commented 1 month ago

Fixes #373

IlCallo commented 4 weeks ago

Thanks for contributing! Luckily Jest allow for cascading mappings, so we can support both the old and the new Quasar versions

See https://jestjs.io/docs/configuration#modulenamemapper-objectstring-string--arraystring

I see you also noticed that we now need to import all used Quasar components, as it is for Vitest I think it used to work anyway in the past because the Quasar build we previously used included all Quasar components instead of properly tree-shake them

I updated the Jest AE templates to reflect this change

I also updated and test the new configuration with app-webpack-v3 too

I'm gonna merge this PR and release a new version soon