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

Class Service

packages/core/test/render3/reactive_safety_spec.ts:150–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 describe('dependency injection', () => {
149 it('should be safe to inject a provided service', () => {
150 @Injectable()
151 class Service {
152 constructor() {
153 expect(getActiveConsumer()).toBe(null);
154 }
155 }
156
157 const injector = createEnvironmentInjector([Service], TestBed.inject(EnvironmentInjector));
158 expectNotToThrowInReactiveContext(() => injector.get(Service));

Callers

nothing calls this directly

Calls 4

InjectableInterface · 0.90
signalFunction · 0.90
toSignalFunction · 0.90
sourceFunction · 0.85

Tested by

no test coverage detected