MCPcopy Index your code
hub / github.com/angular/angular / TestCmp

Class TestCmp

packages/core/test/acceptance/di_spec.ts:416–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414
415 it('should be rejected by @Component.providers', () => {
416 @Component({
417 providers: [environmentProviders as any],
418 standalone: false,
419
420 changeDetection: ChangeDetectionStrategy.Eager,
421 })
422 class TestCmp {
423 readonly token = inject(TOKEN);
424 }
425
426 expect(() => TestBed.createComponent(TestCmp)).toThrowError(/NG0207/);
427 });

Callers

nothing calls this directly

Calls 3

ComponentInterface · 0.90
injectFunction · 0.90
runInInjectionContextFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…