How to unit test device specific functions e.g LocalFileSystem

I’m building a hybrid app using ionic and am currently unit testing using Karma, Jasmine and PhantomJS.

During my testing I’ve come across a few of my functions which access the LocalFileSystem for storage and I am wondering if there is any way to test access to this. With the compatible browsers for Karma, there doesn’t seem to be anything I could use, any suggestions?

you can mock these parts for your code so you only need to check, if the functions are called or not.