mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-06-12 15:13:32 -07:00
fix: address CodeRabbit review findings across runtime modules
- Extract filterLegacyMpvPluginFileCandidates, buildYomitanAnkiSettingsKey, setMpvCurrentSecondarySubText, runSupportAssetUpdatesForLauncherResult helpers - Include forceOverride in yomitan anki settings cache key (was missing, causing incorrect cache hits) - Detect same-PID stale stats daemon state to avoid self-connect - Validate non-empty extension in buildFfmpegSubtitleExtractionArgs - Drop unused message param from showOverlayLoadingStatusNotification - Log and rethrow on session bindings artifact write failure - Add unit tests for all extracted helpers
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { runSupportAssetUpdatesForLauncherResult } from './update-support-assets-runtime';
|
||||
|
||||
test('runSupportAssetUpdatesForLauncherResult logs support-asset errors and preserves launcher result', async () => {
|
||||
const warnings: string[] = [];
|
||||
const launcherResult = { status: 'updated' } as const;
|
||||
const result = await runSupportAssetUpdatesForLauncherResult({
|
||||
launcherResult,
|
||||
updateSupportAssets: async () => {
|
||||
throw new Error('archive failed');
|
||||
},
|
||||
logWarn: (message, details) => {
|
||||
warnings.push(`${message}:${details instanceof Error ? details.message : String(details)}`);
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(result, launcherResult);
|
||||
assert.deepEqual(warnings, ['Support asset update failed after launcher update:archive failed']);
|
||||
});
|
||||
Reference in New Issue
Block a user