-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Compilation errors don't cause non-zero exit codes in ng test #2778
Comments
This also affects, for example, |
Commands like Non-watch commands like For instance, I removed
@kylecordes I don't understand what you're talking about. Have you tried |
Thanks for responding and your great work on angular-cli @filipesilva sorry for not being more specific in the original request. The error is a build error not a test error. I did indeed execute the test with I agree about returning nothing meaningful in
|
A build error should definitely make Can you give me the exact code I can use to reproduce? |
I can confirm this. In a new angular-cli Project create a spec that has TS errors, but is valid JS. Example
Although not valid TS, ng test will pass with RC=0.
afterwards I would expect ng test to fail on TS errors. |
Any news on this? |
@hansl What version of cli come with this fix? In my case I am using Jenkins to "ng test" , Because of exit code is always 0 Jenkins pipeline never goes to failed We are using cli v1.7.3 and we don't have any roadmap to upgrade cli version for now, I am not sure in which version this issue got fixed Thanks in advance Regards, |
in my case |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Versions.
The log given by the failure.
For example, this output of a test run of
ng test
:Mention any other details that might be useful.
It would be useful if angular-cli captured the error code when compiling typescript code and failed early.
ng build
doesn't build tests, so it's not useful either.The text was updated successfully, but these errors were encountered: