Skip to content

Allow --nospec flag for services #2108

Closed

Description

@cburgdorf

With a85a507 a --nospec option was introduced to generate components without tests.

In case there isn't a specific reason why this option shouldn't be valid for services as well, I propose to implement it for consistency.

//cc @PascalPrecht

Activity

  1. added this to the milestone on Sep 21, 2016
  2. Brocco commented on Sep 22, 2016

    @Brocco
    Contributor

    I agree with this as well, but would also expand it to not just services, but also directives, pipes, classes.

  3. filipesilva commented on Sep 22, 2016

    @filipesilva
    Contributor

    All for it myself.

  4. niklas-dahl commented on Sep 23, 2016

    @niklas-dahl
    Contributor

    When adding the --nospec flag to all generate commands, wouldnt it make sense to add it to ng new aswell, just like it works with ng new sassy-project --style=sass?

    ng new notests --nospec would then omit the generation of the e2e folder, karma.conf.js, protactor.conf.js, src/test.ts and src/app/app.component.spec.ts.

    Additionally it could set a flag in the angular-cli.json so that all generatecommands know to not generate a spec file.

    Could look like this:

    "defaults": { "styleExt": "scss", "prefixInterfaces": false, "generateSpecs": false }

    I know I am a terrible person for asking for this, but sometimes the test stuff just gets in the way.

  5. added 3 commits that reference this issue on Sep 28, 2016
    87d52e8
    38c16de
    a55d179
  6. added a commit that references this issue on Oct 3, 2016
    9a2c44b
  7. added a commit that references this issue on Oct 3, 2016
    961c355
  8. added a commit that references this issue on Oct 14, 2016
    4c28865
  9. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  10. locked and limited conversation to collaborators on Sep 6, 2019
  11. added a commit that references this issue on Aug 29, 2023
    635d61e
  12. added a commit that references this issue on May 29, 2026
    099b2c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenteffort1: easy (hours)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions