mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
878ff9826a
@ -82,9 +82,14 @@ describe('loading:', function () {
|
||||
// unmounting should have cleared the MatrixClientPeg
|
||||
expect(MatrixClientPeg.get()).toBe(null);
|
||||
|
||||
// chrome seems to take *ages* to delete the indexeddbs.
|
||||
this.timeout(10000);
|
||||
|
||||
// clear the indexeddbs so we can start from a clean slate next time.
|
||||
await test_utils.deleteIndexedDB('matrix-js-sdk:crypto');
|
||||
await test_utils.deleteIndexedDB('matrix-js-sdk:riot-web-sync');
|
||||
await Promise.all([
|
||||
test_utils.deleteIndexedDB('matrix-js-sdk:crypto'),
|
||||
test_utils.deleteIndexedDB('matrix-js-sdk:riot-web-sync'),
|
||||
]);
|
||||
console.log(`${Date.now()}: loading: afterEach complete`);
|
||||
});
|
||||
|
||||
|
@ -34,7 +34,8 @@ export function deleteIndexedDB(dbName) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`${Date.now()}: Removing indexeddb instance: ${dbName}`);
|
||||
const startTime = Date.now();
|
||||
console.log(`${startTime}: Removing indexeddb instance: ${dbName}`);
|
||||
const req = window.indexedDB.deleteDatabase(dbName);
|
||||
|
||||
req.onblocked = () => {
|
||||
@ -48,7 +49,8 @@ export function deleteIndexedDB(dbName) {
|
||||
};
|
||||
|
||||
req.onsuccess = () => {
|
||||
console.log(`${Date.now()}: Removed indexeddb instance: ${dbName}`);
|
||||
const now = Date.now();
|
||||
console.log(`${now}: Removed indexeddb instance: ${dbName} in ${now-startTime} ms`);
|
||||
resolve();
|
||||
};
|
||||
}).catch((e) => {
|
||||
|
Loading…
Reference in New Issue
Block a user