The memory storage module uses setImmediate, which is not implemented by modern browsers. I see that the test suite adds some kind of shim to work around this but it's not otherwise mentioned anywhere.
I propose a solution that doesn't require externally providing setImmediate:
The main problem is that the code coverage check fails because it's not exercising the browser-only part of that line. I'm not sure how to deal with that.
What do you think? Happy to submit a PR if this sounds good to you and there's some way to make the test coverage happy.
The memory storage module uses
setImmediate
, which is not implemented by modern browsers. I see that the test suite adds some kind of shim to work around this but it's not otherwise mentioned anywhere.I propose a solution that doesn't require externally providing setImmediate:
I've done this in a fork and it passes tests as well as working in my actual application: https://github.com/dimfeld/async-cache-dedupe/tree/fix-setimmediate-in-browser
The main problem is that the code coverage check fails because it's not exercising the browser-only part of that line. I'm not sure how to deal with that.
What do you think? Happy to submit a PR if this sounds good to you and there's some way to make the test coverage happy.