I have service where javascript fetch is used to call an endpoints How to mock fetch API calls in angular using jasmine
fetch('https://' + this.sericeOption.url + '/rest/ms/2/user',
{
method: 'PUT', headers: headers,
body: JSON.stringify(updatedUser)
}
).then((res) =>
{
return res.status != 200
? res.json()
.then((error) => Promise.reject
(
{ code: error.code, message: error.message })
)
: res.json();
});