Convert signal.js and preload.js to Typescript

This commit is contained in:
Scott Nonnenberg
2022-06-13 14:39:35 -07:00
committed by GitHub
parent e18510e41c
commit 2464e0a9c1
94 changed files with 2113 additions and 1848 deletions

View File

@@ -0,0 +1,28 @@
// Copyright 2021-2022 Signal Messenger, LLC
// 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';
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);
},
};