Open shifenis opened 2 years ago
I'm trying to use my local file (inside assets folder) as a service mock, but I can't retrieve any data from it.
During the test on the iOS device, I'm unable to catch any error
During the test on the Android device I facing off two types of errors:
file://
MalformedURLException
CastExpection
JSON
Get
return from(Http.get({ url: `file://assets/demo/getProfile.json` })).pipe( map(response => response.data), );
From both platforms, I expect to get value from my JSON (as HttpService from `Angular. On the iOS side, I even expect to catch some errors.
HttpService
Bug description
I'm trying to use my local file (inside assets folder) as a service mock, but I can't retrieve any data from it.
iOS
During the test on the iOS device, I'm unable to catch any error
Android
During the test on the Android device I facing off two types of errors:
file://
I getMalformedURLException
;file://
to my current URL I get aCastExpection
Steps to reproduce
JSON
file inside your assets;Get
with the package pointing on the file, in my case:Expected behavior
From both platforms, I expect to get value from my JSON (as
HttpService
from `Angular. On the iOS side, I even expect to catch some errors.Tested on
iOS
Android