Closed aneer-anwar closed 5 years ago
This library is a wrapper around IDB. It's 100% dependent on an IDB implementation. You could run your tests in something like Puppeteer.
ok thank you
FYI. I could do the browser testing using Karma + jasmine + rollup. If anyone is interested I can share the code.
Jest uses JSDOM to fake dom elements but unfortunately, Indexeddb support is only in their timeline and not implemented. One workaround is to include 'fake-indexeddb' module . but 'idb' module looks for window .indexeddb. Is there any way to test 'idb' using jest?