Replace MessageController with MessageCache

This commit is contained in:
Josh Perez 2023-10-03 20:12:57 -04:00 committed by GitHub
parent ba1a8aad09
commit 7d35216fda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 2237 additions and 1229 deletions

View file

@ -1,33 +0,0 @@
// Copyright 2018 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
// For reference: https://github.com/airbnb/javascript
module.exports = {
env: {
mocha: true,
browser: true,
},
globals: {
check: true,
gen: true,
},
parserOptions: {
sourceType: 'module',
},
rules: {
// We still get the value of this rule, it just allows for dev deps
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
// We want to keep each test structured the same, even if its contents are tiny
'arrow-body-style': 'off',
},
};

View file

@ -1,8 +1,6 @@
// Copyright 2014 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* global Whisper, _, Backbone */
/*
* global helpers for tests
*/
@ -18,20 +16,21 @@ function deleteIndexedDB() {
});
}
window.Events = {
getThemeSetting: () => 'light',
};
/* Delete the database before running any tests */
before(async () => {
window.testUtilities.installMessageController();
await window.testUtilities.initialize();
await deleteIndexedDB();
await window.testUtilities.initializeMessageCounter();
await window.Signal.Data.removeAll();
await window.storage.fetch();
});
window.textsecure.storage.protocol = window.getSignalProtocolStore();
window.testUtilities.prepareTests();
delete window.testUtilities.prepareTests;
window.textsecure.storage.protocol = window.getSignalProtocolStore();
!(function () {
const passed = [];