We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MockComponent doesn't take into account that standalone = true by default from angular 19
MockComponent
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BsGridComponent } from './grid.component'; import { MockComponent } from 'ng-mocks'; import { BsContainerComponent } from '@mintplayer/ng-bootstrap/container'; describe('BsGridComponent', () => { let component: BsGridComponent; let fixture: ComponentFixture<BsGridComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [BsGridComponent], imports: [ MockComponent(BsContainerComponent) ] }).compileComponents(); fixture = TestBed.createComponent(BsGridComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
The following works
@Component({ selector: 'bs-container', templateUrl: './container.component.html', styleUrls: ['./container.component.scss'], standalone: true }) export class BsContainerComponent {}
The following fails
@Component({ selector: 'bs-container', templateUrl: './container.component.html', styleUrls: ['./container.component.scss'], //standalone: true }) export class BsContainerComponent {}
Link:
The text was updated successfully, but these errors were encountered:
This is a duplicate with #10503
Sorry, something went wrong.
assertNoStandaloneComponents()
No branches or pull requests
Description of the bug
MockComponent
doesn't take into account that standalone = true by default from angular 19An example of the bug
The following works
The following fails
Link:
Expected vs actual behavior
The text was updated successfully, but these errors were encountered: