Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude TestBed.configureTestingModule in unit test code for Standalone Component #29399

Open
hannah23280 opened this issue Jan 19, 2025 · 0 comments
Labels
area: @schematics/angular needs: discussion On the agenda for team meeting to determine next steps

Comments

@hannah23280
Copy link

Command

generate

Description

Hi,
I not sure if there is any current plan for this.
Currently, generating a new component with Angular CLI includes the below statement

await TestBed.configureTestingModule({
      imports: [ProductListComponent]
    })
    .compileComponents();

Describe the solution you'd like

Given that TestBed.configureTestingModule is no longer required, as component is standalone by default, the statement should be excluded from the generated unit test file (to avoid cluttering the code) when generating component with Angular CLI , unless standalone option is turned off explicitly

Describe alternatives you've considered

No response

@clydin clydin added area: @schematics/angular needs: discussion On the agenda for team meeting to determine next steps labels Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @schematics/angular needs: discussion On the agenda for team meeting to determine next steps
Projects
None yet
Development

No branches or pull requests

2 participants