Replace MessageController with MessageCache
This commit is contained in:
parent
ba1a8aad09
commit
7d35216fda
73 changed files with 2237 additions and 1229 deletions
|
@ -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',
|
||||
},
|
||||
};
|
13
test/test.js
13
test/test.js
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue