-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
No tests found on 'ng test' with dot in the path to the root directory #615
Comments
I've never had this problem. Could you provide a reproduction? |
What do you want me to provide? Is 'steps to reproduce' not enough? |
No, not enough. I ran through them and don't see such errors. |
Issues without reproductions should be closed as well as on the StackOverflow:
What's the problem to make a working example thus everyone who has a look at this issue is able to reproduce it, debug and prolly provide a fix? |
I just re-checked with simple-app example:
I did change nothing, and if I will create another
That's why I guess it might be related to environment (different nodejs versions etc)... |
I've investigated the issue I have. And I found the problem: root path to project contains Further investigation showed some interesting things:
As I workaround for that I have specified
It overrides generated It's weird because the Seems like it's not a problem with Hovewer, @just-jeb - Do you think I need to open another issue/suggestion to handle such case by I've created issue in jest repo but I have no idea how fast they will proceed that... At least for now I have a workaround without changing project path or renaming folders |
Hi @MaKCbIMKo thanks for the effort. |
Hi @just-jeb - Ok, so I will wait for updates from you - I'm curios what you will find. |
Tests ran fine locally but I encountered this exact issue in Azure Devops CI. I can also confirm the workaround. |
@mcaden Can you confirm that the path also has dots in it? |
Yes, my repo name and one of the parent project folders both have one/more dots in them. Repo name is |
Maybe OS? What's your local system and what system are you using in CI? |
Local is Windows 10. Build box is Windows Server 2016. |
I'm having this issue with the latest Jest version installed (25.1.0), it was fine when I was using Jest 24.9.0. These are 1 release away from each other Releases angular-builders/jest version is 8.3.2. Running:
Results in:
|
@jonathanlie No dots in path? Does specifying absolute path help? |
I had the same issue as above, after updating 24.9.0 to 25.1.0 Seems that testMatch should be adjusted as follow: p.s. The related jest discussion can be found here: testMatch on Windows |
@it-ias thanks for the update. I'm gonna take this out into a separate issue as it seems to be unrelated to the one that started this thread. |
All, please track #673 for Jest 25 related issue. |
I had the same issue, but it turns out that when a test fails, the test runner claims there were no tests found. In other words, the wrong error is given. |
Describe the bug
When I do
ng test
- it doesn't find any single test.Firstly, I tried that on existing project (which is using jest but via jest cli and I know tests exist) -> 0 tests discovered.
Then, I tried new project (via
ng new
) -> 0 tests discovered.At last, I downloaded
simple-app
example -> 0 tests discovered.And I have no idea what I am doing wrong or haven't configured properly.
Any ideas what's the reason?
Ask for more information -> will provide information that might help.
To Reproduce
(for instance, new project)
ng new jest-app
npm i -D jest @types/jest @angular-builders/jest
angular.json
to use new buildernpm run test
->ng test
Expected behavior
All tests are discovered
Builder:
Libraries
angular-devkit/build-angular
: from 0.802.2 to 0.803.19Additional context
node.js
: 12.13.0The text was updated successfully, but these errors were encountered: