You can always mock those dependencies since those libraries should have been in theory tested before so you only need to test your logic. There's a lot of different ways you can do this, for example in Jest you can simply do in the top of your test:
And it'll automatically mock every import that your code does of localforage so that instead of running the real library you can just mock the calls. You can read more here: jestjs.io/docs/en/mock-functions
I suppose Mocha has a similar approach too if you want to use it.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.