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

Getting error in component testing #225

Closed
piotrpalek opened this issue Nov 21, 2023 · 3 comments
Closed

Getting error in component testing #225

piotrpalek opened this issue Nov 21, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@piotrpalek
Copy link

piotrpalek commented Nov 21, 2023

I have Cypress 13.5.1 and I'm using it with Vite 5.0.2

I'm getting this error when running Cypress via cypress run (doesn't happen when I run it via the GUI):

  1) <RecentActivityCard />
       "before each" hook for "Renders locked state":
     TypeError: Cannot destructure property 'args' of 'Cypress.emitMap(...)[0]' as it is undefined.

Because this error occurred during a `before each` hook we are skipping all of the remaining tests.
      at Object.nonQueueTask (http://localhost:3050/__cypress/src/node_modules/.vite/deps/cypress-terminal-report_src_installLogsCollector.js?v=c573dfcd:4288:19)
      at LogCollectSimpleControl.sendLogsToPrinter (http://localhost:3050/__cypress/src/node_modules/.vite/deps/cypress-terminal-report_src_installLogsCollector.js?v=c573dfcd:5350:17)
      at <unknown> (http://localhost:3050/__cypress/src/node_modules/.vite/deps/cypress-terminal-report_src_installLogsCollector.js?v=c573dfcd:5399:18)
      at <unknown> (http://localhost:3050/__cypress/src/node_modules/.vite/deps/cypress-terminal-report_src_installLogsCollector.js?v=c573dfcd:4943:61)
      at Array.forEach (<anonymous>)
      at LogCollectorState.emit (http://localhost:3050/__cypress/src/node_modules/.vite/deps/cypress-terminal-report_src_installLogsCollector.js?v=c573dfcd:4943:39)
      at LogCollectorState.addLog (http://localhost:3050/__cypress/src/node_modules/.vite/deps/cypress-terminal-report_src_installLogsCollector.js?v=c573dfcd:4861:14)
      at Context.<anonymous> (http://localhost:3050/__cypress/src/node_modules/.vite/deps/cypress-terminal-report_src_installLogsCollector.js?v=c573dfcd:4790:31)
      at overridden.fn (http://localhost:3050/__cypress/runner/cypress_runner.js:111038:21)
      at wrapped (http://localhost:3050/__cypress/runner/cypress_runner.js:138644:43)

I'll try to investigate more, but for now this is all I have.
Initially I didn't even see this error, it looked like it was just hanging there with no output, I tried various options and I think the combinations of printLogsToConsole: 'always', and enableContinuousLogging: true allowed me to see the issue.

edit: opened the relevant file from the stacktrace in the browser, maybe this'll help a bit:

image
@archfz
Copy link
Owner

archfz commented Nov 22, 2023

They might have introduced a breaking change. We are tapping into the internals of cypress a little bit.

@bvandercar-vt
Copy link
Contributor

+1

@archfz archfz added the bug Something isn't working label Dec 18, 2023
archfz added a commit that referenced this issue Dec 18, 2023
\#225: Fix component tests failing to run non queue tasks.
@archfz
Copy link
Owner

archfz commented Dec 26, 2023

Forgot to mention that i did a release for this. In 5.3.10. Please check.

@archfz archfz closed this as completed Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants