Generate .spec files for already existing components / services
See original GitHub issueSolution
If you look for right now solution please follow ngx-spec.
Bug Report or Feature Request (mark with an x)
- [ ] bug report -> please search issues before submitting
- [x] feature request
Versions.
@angular/cli: 1.4.2 node: 8.1.3 os: darwin x64 @angular/animations: 4.3.6 @angular/common: 4.3.6 @angular/compiler: 4.3.6 @angular/core: 4.3.6 @angular/forms: 4.3.6 @angular/http: 4.3.6 @angular/platform-browser: 4.3.6 @angular/platform-browser-dynamic: 4.3.6 @angular/router: 4.3.6 @angular/cli: 1.4.2 @angular/compiler-cli: 4.3.6 typescript: 2.4.2
Repro steps.
The log given by the failure.
Desired functionality.
I want to generate a .spec file for already existing component / service that does not have a spec yet / has an outdated spec. More on the usecase https://stackoverflow.com/q/46276055/1990451
Mention any other details that might be useful.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:117
- Comments:55 (6 by maintainers)
Top Results From Across the Web
Angular CLI create .spec files for already existing components
However sometimes I would like to have an option to generate / recreate the corresponding *.spec file for an already existing component / ......
Read more >Angular spec generator - Visual Studio Marketplace
Select an Angular *.ts file and use right click to generate the spec file. Generate spec (jest / jasmine / mockito / empty)...
Read more >13. Create Spec file for Posts Component to do Isolated Unit ...
In this video we will see how to Create Spec file for Posts Component to do Isolated Unit Test for a component -...
Read more >generate spec files for already existing components
To create a catalog from an existing catalog In the Spec Editor, click File menuNewNew Catalog From Existing. Enter the Source Catalog name...
Read more >Angular-spec-generator - npm.io
choice directory which you want to generate spec, and then it will generate all Angular spec. only generate file when spec file not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I created a pull request implementing the feature https://github.com/angular/devkit/pull/938 .
Allows to create specs for component, directive, module, service, pipe, guard (based on corresponding schematics) by running
or as a file (more convenient because files normally already exist and it is easier to point to the file)
Please review.
Yes generating a spec file after we already generated our component and modified it. ng g component your-component --spec-only