fix(testing): async/fakeAsync/inject/withModule helpers should pass through context to callback functions (#13718)
Make sure that context (`this`) that is passed to functions generated by test helpers is passed through to the callback functions. Enables usage of Jasmine's variable sharing system to prevent accidental memory leaks during test runs.
This commit is contained in:

committed by
Miško Hevery

parent
d69717cf79
commit
5f40e5ba21
@ -67,7 +67,7 @@ export declare class TestBed implements Injector {
|
||||
}): void;
|
||||
configureTestingModule(moduleDef: TestModuleMetadata): void;
|
||||
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
||||
execute(tokens: any[], fn: Function): any;
|
||||
execute(tokens: any[], fn: Function, context?: any): any;
|
||||
get(token: any, notFoundValue?: any): any;
|
||||
/** @experimental */ initTestEnvironment(ngModule: Type<any>, platform: PlatformRef): void;
|
||||
overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;
|
||||
|
Reference in New Issue
Block a user