I am using Transfer
plugin in my ionic 2 app for sending files. While testing the app, I had difficulty in mocking Transfer
. Please take a look into this problem to understand the context . After that discussion , I decided to inject Transfer
in my service.
So I added Transfer
in my providers in app.module.ts
.And injected it into my service.
constructor( public transfer: Transfer){}
But this leads to an error. FileTransfer is not defined
. I guess its because there is no browser support for this plugin. So I am in a tough spot, I do not know how I can make working testable code. Any ideas?