Closed rafeca closed 5 years ago
As suggested by @as-cii , I've started using electron-mocha
to not have to mock indexedDB
or localStorage
. The change is in https://github.com/atom/telemetry/pull/28/commits/eadea5f94822b8b8d484e8c9ea79760c81929777
This PR adds an
IndexedDB
database implementation by building on top of https://github.com/atom/telemetry/pull/27.This allows the
telemetry
package to keep events between sessions (so it fixes https://github.com/atom/telemetry/issues/26).To interact with the
IndexedDB
API I've used theidb
package, which is mostly a thin wrapper to expose the API using Promises.Benefits of this library:
IndexedDB
API (which is handling theIDBrequest
objects and callbacks).IndexedDB
API, so it's not an abstraction layer that makes it hard to understand what's going on behind the scenes.Next steps: