Is there a way to customize the default angular testbed html template? By default, it looks like this:
<div id="root0" _nghost-a-c16="" ng-version="10.2.5"></div>
I want to either add a custom class or turn it into a full-fledged html page.
<div id="root0" class="myTestClass" _nghost-a-c16="" ng-version="10.2.5">
<!-- I would like to include this custom class here -->
</div>
or
<container id="root0" class="myTestClass" _nghost-a-c16="" ng-version="10.2.5">
<!-- I am looking for this custom element instead -->
</container>
Below is a snippet of my simple testing code.
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
});
fit('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
console.log('fixture', fixture.debugElement);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
});