Closed cbleek closed 2 years ago
Have you read release notes? There are some manual tweaks you'll need to perform between beta6 and beta7 Go through the updated migration guide and check if you miss something
I have read the notes. But we have a hard time figuring out what needs to be tweaked manually.
I would pay you $100, if you show me how to fix the simple test
https://gitlab.com/yawik/applicationform/-/blob/master/src/components/PageFooter.jest.spec.js
II would be willing to pay via Upwork or Github Sponsors.
Some update steps I see have not be applied, or have been applied only partially, taken from the README migration guide:
beforeEach
isn't imported from @jest/globals
If you've never touched test/jest/jest.setup file since you installed this AE, you can now safely delete it and the related setupFilesAfterEnv property into jest.config.js. Its main purpose was to apply a Promise polyfill, which isn't needed anymore due to the new minimum Node version being v12
Add/update '^quasar$' mapping into your jest.config.js to quasar/dist/quasar.esm.prod.js and add quasar into the esModules array in the same file. Quasar v2 CJS build is tailor-made for SSR, so the ESM one must be used
The last one is probably the cause of your issues Also consider that QFooter may require QLayout injections to work properly, as QPage, QDrawer, etc do Check this out in that regards: https://github.com/quasarframework/quasar-testing/tree/next/packages/unit-jest#testing-qpage-components
If this helped you, please donate those $100 to Quasar project directly: https://github.com/sponsors/rstoenescu
yes. It helped. Thank you.
I've increased my sponsorship to the next level
https://gitlab.com/yawik/applicationform/-/commit/cb1484ac41cc7286f2b9569927d94ad9d427852b
Happy it worked :)
downgrade to 3.0.0-alpha.6 fixes the tests again.
Fixed by:
yarn add @quasar/quasar-app-extension-testing-unit-jest@3.0.0-alpha.6 -D
Example Test: https://gitlab.com/yawik/applicationform/-/blob/master/src/components/PageFooter.jest.spec.js
Example Error Messages: