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

Class TestCmp

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

Source from the content-addressed store, hash-verified

409
410 it('should be rejected by @Component.providers', () => {
411 @Component({
412 providers: [environmentProviders as any],
413 })
414 class TestCmp {
415 readonly token = inject(TOKEN);
416 }
417
418 expect(() => TestBed.createComponent(TestCmp)).toThrowError(/NG0207/);
419 });

Callers

nothing calls this directly

Calls 3

ComponentInterface · 0.90
injectFunction · 0.90
runInInjectionContextFunction · 0.90

Tested by

no test coverage detected