MCPcopy Create free account
hub / github.com/angular/angular / createTestCmp

Function createTestCmp

packages/core/test/linker/query_integration_spec.ts:834–844  ·  view source on GitHub ↗
(
  type: Type<T>,
  template: string,
  components: any[] = [],
)

Source from the content-addressed store, hash-verified

832}
833
834function createTestCmp<T>(
835 type: Type<T>,
836 template: string,
837 components: any[] = [],
838): ComponentFixture<T> {
839 TestBed.overrideComponent(type, {set: {template}});
840 if (components.length > 0) {
841 TestBed.overrideComponent(type, {add: {imports: components}});
842 }
843 return TestBed.createComponent(type);
844}
845
846function createTestCmpAndDetectChanges<T>(
847 type: Type<T>,

Callers 2

Calls 2

overrideComponentMethod · 0.65
createComponentMethod · 0.65

Tested by

no test coverage detected