mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-06-13 15:13:32 -07:00
refactor(main): split main.ts into focused runtime modules (#123)
This commit is contained in:
@@ -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