MCPcopy
hub / github.com/angular/angular / runInInjectionContext

Method runInInjectionContext

packages/core/testing/src/test_bed.ts:143–143  ·  view source on GitHub ↗

* Runs the given function in the `EnvironmentInjector` context of `TestBed`. * * @see https://angular.dev/api/core/EnvironmentInjector#runInContext

(fn: () => T)

Source from the content-addressed store, hash-verified

141 * @see {@link https://angular.dev/api/core/EnvironmentInjector#runInContext}
142 */
143 runInInjectionContext<T>(fn: () => T): T;
144
145 execute(tokens: any[], fn: Function, context?: any): any;
146

Implementers 1

TestBedImplpackages/core/testing/src/test_bed.ts

Calls

no outgoing calls

Tested by 2

testContextFunction · 0.52
createRouterScrollerFunction · 0.52