I am running test for angular app through jasmine. I want to know , How to assign values or access value of the variables that are local to function?
You can't test it because it is gone after the call. they are scoped to the method closure,
Declare them globally globallyDeclaredvariable: boolean;
in your
class
Use them with this.globallyDeclaredvariable = true;
inside your
method
Then you can write
expect(component.globallyDeclaredvariable).toBeTruthy();
in your
tests.