2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
2022-06-13 21:39:35 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
/* eslint-disable no-console */
|
|
|
|
|
|
|
|
import { ipcRenderer as ipc } from 'electron';
|
|
|
|
import { sync } from 'fast-glob';
|
|
|
|
|
|
|
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
|
|
import { assert } from 'chai';
|
|
|
|
|
2023-01-19 00:02:03 +00:00
|
|
|
import { getSignalProtocolStore } from '../../SignalProtocolStore';
|
2023-04-11 03:54:43 +00:00
|
|
|
import { MessageController } from '../../util/MessageController';
|
|
|
|
import { initializeMessageCounter } from '../../util/incrementMessageCounter';
|
2023-01-19 00:02:03 +00:00
|
|
|
|
2022-06-13 21:39:35 +00:00
|
|
|
window.assert = assert;
|
|
|
|
|
|
|
|
// This is a hack to let us run TypeScript tests in the renderer process. See the
|
|
|
|
// code in `test/index.html`.
|
|
|
|
|
|
|
|
window.testUtilities = {
|
|
|
|
onComplete(info) {
|
|
|
|
return ipc.invoke('ci:test-electron:done', info);
|
|
|
|
},
|
|
|
|
prepareTests() {
|
|
|
|
console.log('Preparing tests...');
|
|
|
|
sync('../../test-{both,electron}/**/*_test.js', {
|
|
|
|
absolute: true,
|
|
|
|
cwd: __dirname,
|
|
|
|
}).forEach(require);
|
|
|
|
},
|
2023-04-11 03:54:43 +00:00
|
|
|
installMessageController() {
|
|
|
|
MessageController.install();
|
|
|
|
},
|
|
|
|
initializeMessageCounter() {
|
|
|
|
return initializeMessageCounter();
|
|
|
|
},
|
2022-06-13 21:39:35 +00:00
|
|
|
};
|
2023-01-19 00:02:03 +00:00
|
|
|
|
|
|
|
window.getSignalProtocolStore = getSignalProtocolStore;
|