Skip to content

Template for standalone-component-spec is wrong #31035

@PieterjanDeClippel

Description

@PieterjanDeClippel

Command

generate

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

https://github.com/angular/angular-cli/blob/8a512cc1e38754c37af8023f2845d1ade6fe0782/packages/schematics/angular/component/files/__name%40dasherize%40if-flat__/__name%40dasherize__.__type%40dasherize__.spec.ts.template

Minimal Reproduction

ng g c Test

Exception or Error


Your Environment

ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 20.1.6
Node: 22.13.0
Package Manager: npm 10.9.2
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2001.6 (cli-only)
@angular-devkit/core         20.1.6 (cli-only)
@angular-devkit/schematics   20.1.6 (cli-only)
@schematics/angular          20.1.6 (cli-only)

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions