signal-desktop/ts/windows/main/phase4-test.ts

30 lines
769 B
TypeScript
Raw Normal View History

2023-01-03 19:55:46 +00:00
// Copyright 2017 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-console */
/* eslint-disable global-require */
2024-03-15 14:20:33 +00:00
import fs from 'fs';
const { config } = window.SignalContext;
if (config.environment === 'test') {
console.log('Importing test infrastructure...');
require('./preload_test');
}
if (config.ciMode) {
console.log(
2024-03-15 14:20:33 +00:00
`Importing CI infrastructure; enabled in config, mode: ${config.ciMode}, ` +
`backupPath: ${config.ciBackupPath}`
);
2023-01-13 00:24:59 +00:00
const { getCI } = require('../../CI');
2024-03-15 14:20:33 +00:00
window.SignalCI = getCI({
deviceName: window.getTitle(),
backupData: config.ciBackupPath
? fs.readFileSync(config.ciBackupPath)
: undefined,
});
}