mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
refactor(main): split main.ts into focused runtime modules (#123)
This commit is contained in:
1 parent
94a65416ae
commit
33e767458f
32 files changed
+3582
-2003
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { detectWindowsMpvPluginRemovalCandidates } from './first-run-setup-plugin';
|
||||
|
||||
test('Windows plugin removal candidates include portable directory installs', () => {
|
||||
const mpvPath = 'C:\\tools\\mpv\\mpv.exe';
|
||||
const portablePluginDir = 'C:\\tools\\mpv\\portable_config\\scripts\\subminer';
|
||||
const existing = new Set([portablePluginDir]);
|
||||
|
||||
const candidates = detectWindowsMpvPluginRemovalCandidates({
|
||||
homeDir: 'C:\\Users\\tester',
|
||||
appDataDir: 'C:\\Users\\tester\\AppData\\Roaming',
|
||||
mpvExecutablePath: mpvPath,
|
||||
existsSync: (candidate) => existing.has(candidate),
|
||||
});
|
||||
|
||||
assert.deepEqual(candidates, [{ path: portablePluginDir, kind: 'directory' }]);
|
||||
});
|
||||
Reference in new issue
Block a user