Component Testing never finds any tests
See original GitHub issueCurrent behavior
Hi!
I believe there seems to be some error with the component testing framework at the moment that is making it completely unusable. I followed all the steps in the documentation to be able to component test Vue components (in my case I am also using TypeScript), and after making several tweaks I was unable to get the runner ever to work because it can never find any test errors (see image below).
I have tried the following changes to fix this behaviour (neither of these have worked, still getting tests not found):
- Removed
componentFolder
fromcypress.json
to use the default path - Written a JavaScript spec file instead of TypeScript
- Written a JavaScript Vue component AND a spec file instead of using TypeScript
- In the other company project that I found this problem, we were using path alias and project references so I thought maybe that was what was causing the issue so I stopped using the custom
webpack.config.js
that you can find in the repo posted below, so theplugins/index.ts
just setupson('dev-server:start')
with the config from the Vue CLI service, no dice
Nothing has been able to make the test runner pick up the tests within the spec files 😥
Also I have another weird problem where my default runner is Opera GX but the component runner always opens up Edge for some reason 😁
I have also noticed that someone opened the same ticket about React a few hours ago https://github.com/cypress-io/cypress/issues/16807
Desired behavior
The runner does seem to pick up the .spec.ts
files I wrote in the glob expression, but it never finds the describe/it
inside so it always reports that No test files were found
.
Test code to reproduce
I have gone off and made a public repo that you should be able to clone and run up: https://github.com/St1fle/cypress-component-testing-error
Given all the changes I’ve done it doesn’t seem like this is something to do with my specific configuration but rather just a global problem with the framework right now but in case I am wrong and it’s something I have you can just clone the repo and run npm run test
.
You should see one Button.spec.ts
case on the left that if you click on brings up the error.
I’ve also left the example JS files that Cypress creates when it runs the first time to showcase that even for those files the component test runner fails to find tests on.
Versions
Cypress version: 7.4 Browser: Edge (although my default browser is Opera GX) Operating System: Windows CI Provider: N/A (happens locally)
Other package versions can be found within the package.json
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:12 (8 by maintainers)
Top GitHub Comments
Maybe this issue is also related? https://github.com/cypress-io/cypress/issues/16807
@St1fle Thanks for reporting the issue. In your example repo, we don’t have access to install the
@yottaltd/eslint-config
and@yottaltd/eslint-plugin
dependencies. These need to be removed in order to runnpm install
successfully.The issue can be recreated after removing these deps and their references.