// Angular - Jasmine
// Fake a HTTP request
public getSomething() : Observable<any>{
let response: DataResult<any> = { data: "something" };
return of(response);
}
public static mockGetProfile(){
const response = JSON.parse(`
"name": "abc",
"active": true,
...all other json fields that you want
`);
let obs = new Observable((subscriber) => {
setTimeout(()=>{
subscriber.next(response);
subscriber.complete();
}, 3000);
});
return obs;
}