Skip to content

Feature Request: Replace Angular Testbed based spec schematics #6293

Description

@DDtMM

Describe the feature or problem you'd like to solve

My fingers hurt from having to replace the default code in every spec with some initial code for testing with NgMocks.

Proposed solution

Add a new library project called schematics created using @angular-devkit/schematics-cli.

  • Add spec schematics for the following types where there are existing specs created:
    • class
    • Component
    • Directive
    • Interceptor
    • Pipe
    • Service
  • _Nice to have: Application app.component.spec.ts for both module and standalone components. Seems like a pain for a specific file.
  • Nice to have: ng_add schematic that asks to replace default schematics in a project's angular.json.
  • Package schematics with ng-mocks.
  • Documentation for schematics including instructions for modifying angular.json.

Additional context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions