Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

angular jasmine mock http request

// Angular - Jasmine
// Fake a HTTP request

public getSomething() : Observable<any>{
    let response: DataResult<any> = { data: "something" };
    return of(response);
}
 
PREVIOUS NEXT
Tagged: #angular #jasmine #mock #http #request
ADD COMMENT
Topic
Name
8+7 =