mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
chore(repo): remove dead code and useless tests (#3375)
This commit is contained in:
1 parent
7e177a1c90
commit
1cd62eb661
1391 files changed
+783
-120415
No files matched your search
@@ -1,9 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import assert from 'node:assert/strict';
|
||||
import {readFileSync} from 'node:fs';
|
||||
import {describe, test} from 'node:test';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {installElectronStub} from './LocalAppTestSupport.test.mjs';
|
||||
|
||||
const events = [];
|
||||
@@ -119,8 +117,6 @@ const {armBlockedShellUpdate, getBlockedShellUpdate, SPLASH_MANUAL_UPDATE_MESSAG
|
||||
'@electron/main/ShellUpdateSplash'
|
||||
);
|
||||
|
||||
const UPDATER_SOURCE = readFileSync(fileURLToPath(new URL('./Updater.ts', import.meta.url)), 'utf8');
|
||||
|
||||
const SELF_UPDATE_PLAN = {capability: ShellUpdateCapability.SELF_UPDATE, updater: 'velopack'};
|
||||
const MANUAL_PLATFORM_PLAN = {capability: ShellUpdateCapability.MANUAL_DOWNLOAD, reason: 'platform'};
|
||||
const MANUAL_UNPACKAGED_PLAN = {capability: ShellUpdateCapability.MANUAL_DOWNLOAD, reason: 'unpackaged'};
|
||||
@@ -243,18 +239,6 @@ describe('shell update capability', () => {
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
test('the updater keeps no platform checks and no download page of its own', () => {
|
||||
assert.doesNotMatch(UPDATER_SOURCE, /isPortableMode|isFlatpakRuntime|isRunningFromAppImage/);
|
||||
assert.doesNotMatch(UPDATER_SOURCE, /const DOWNLOAD_PAGE_URL =/);
|
||||
assert.match(UPDATER_SOURCE, /const plan = resolveShellUpdatePlan\(\);/);
|
||||
});
|
||||
|
||||
test('the updater reads the arch and the format urls from the shared leaf instead of keeping its own', () => {
|
||||
assert.doesNotMatch(UPDATER_SOURCE, /const UPDATE_BASE_URL =|function getUpdateBaseUrl\(/);
|
||||
assert.doesNotMatch(UPDATER_SOURCE, /function buildManualLatestDownloadUrl/);
|
||||
assert.match(UPDATER_SOURCE, /from '@electron\/main\/ShellDownloadFormats'/);
|
||||
});
|
||||
});
|
||||
|
||||
describe('blocked shell update states', () => {
|
||||
|
||||
Reference in new issue
Block a user