I am currently working with angular cli project. I see the spec file generated for every component, services and I want to remove all this spec files from this existing project.
Deleting them from an existing project depends on your OS. If it is a Unix based system you could do something like this:
find . -type f -name '*.spec.ts' -delete
This would remove all files which end in spec.ts
recursively starting in your current directory.
To prevent these files from being generated again use the --skipTests
flag when generating components, providers, whatever:
ng g s my-service --skipTests
This will generate a service my-service
without any spec files.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.