Closed MarkTallentire closed 2 years ago
Hi @MarkTallentire, sorry for late response
There may be multiple causes to your problem, can you create a repro for us to take a look at?
As example, it's not clear where that reading of desktop
is coming from, it may be related to how you setup your tests
If you get it into all components, it's probably something used into a common place for all of those, eg. the store you're importing
@IlCallo Give me a few days, I'm away from my machines till Saturday but happy to upload our repo for you when I'm back
No problem, I'm focusing on Cypress Component Testing support right now, as I find it a far superior choice for component testing if compared with Jest, so I probably won't be able to check and fix this before a couple weeks unluckily
No worries, we've swapped to using cypress for everything at this point and we'll go back and revisit jest in the future but we needed to get our project going.
I'm having the same issue trying to test a component with q-select. Is the workaround to just use Cypress over jest for the time being? From the Quasar documentation, it seems that support for Cypress component testing isn't finished. Wouldn't want to make the switch if it's just going to have different issues.
@IlCallo See https://github.com/quasarframework/quasar-testing/issues/192 for an example repo, not mine but someone else seems to have the same issue.
While we find the time to check out these Jest problems, we just released a new version of Cypress AE with Component Testing support, try it out!
https://github.com/quasarframework/quasar-testing/releases/tag/e2e-cypress-v4.0.0-beta.7
Hey there, could you check if this comment and [this new release] (https://github.com/quasarframework/quasar-testing/releases/tag/unit-jest-v3.0.0-alpha.7) solve your problem?
Check the migration guide as you'll need to manually update the jest.config.js
scaffolded file to apply the fix
Closing for now, as I expect latest release to fix this Let us know if the issue has been actually solved
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "TypeError: Cannot read properties of undefined (reading 'desktop')".] { code: 'ERR_UNHANDLED_REJECTION'
Using Node V16 which now forces handling of rejections.
Test (No assertions due to trying to debug this, however we have tried asserting the error on the actual await using a catch block)
Component being tested:
We've been having serious issues doing any testing on components in Quasar and are seriously ready to give up, please help :(