Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create only spec.ts file with Angular CLI?

Tags:

angular

I was creating the Angular component with --spec=false but now I need to do unit test, is there a way to create only spec.ts files with Angular CLI?

like image 720
deleting Avatar asked Nov 01 '25 17:11

deleting


1 Answers

Currently, Angular CLI does not provide this functionality. However, you can make a pull request to the @angular/cli team to integrate your idea, and if the code works and the idea seems good enough, they might add it.

Or, you can use SimonTest is an extension to VS Code that generates tests for existing files.

like image 188
Kinjal Hinsu Avatar answered Nov 04 '25 08:11

Kinjal Hinsu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!