diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-06-21 19:18:36 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-06-21 19:18:36 +0200 |
commit | a4e4125cca8644703d7cff527a39c1a5a9842eba (patch) | |
tree | fb4de931ea0db1f314fcf6850806989a40c9e76e /packages/idb-bridge/src/BridgeIDBFactory.ts | |
parent | 2ee9431f1ba5bf67546bbf85758a01991c40673f (diff) | |
download | wallet-core-a4e4125cca8644703d7cff527a39c1a5a9842eba.tar.xz |
idb: tests working
Diffstat (limited to 'packages/idb-bridge/src/BridgeIDBFactory.ts')
-rw-r--r-- | packages/idb-bridge/src/BridgeIDBFactory.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/idb-bridge/src/BridgeIDBFactory.ts b/packages/idb-bridge/src/BridgeIDBFactory.ts index c2747238e..ad02be461 100644 --- a/packages/idb-bridge/src/BridgeIDBFactory.ts +++ b/packages/idb-bridge/src/BridgeIDBFactory.ts @@ -31,6 +31,7 @@ class BridgeIDBFactory { public cmp = compareKeys; private backend: Backend; private connections: BridgeIDBDatabase[] = []; + static enableTracing: boolean = true; public constructor(backend: Backend) { this.backend = backend; @@ -165,7 +166,17 @@ class BridgeIDBFactory { await transaction._waitDone(); + // We don't explicitly exit the versionchange transaction, + // since this is already done by the BridgeIDBTransaction. db._runningVersionchangeTransaction = false; + + const event2 = new FakeEvent("success", { + bubbles: false, + cancelable: false, + }); + event2.eventPath = [request]; + + request.dispatchEvent(event2); } this.connections.push(db); |