mock a function that returns a promise karma code example
Example: create mock promise angular
return new Promise<string>(resolve => resolve(localStringValue));
return new Promise<string>(resolve => resolve(localStringValue));