Save uncommitted changes
Build / Lint & Test (push) Successful in 28s

This commit is contained in:
PickleRick committed 2026-09-21 23:38:34 +02:00
1 parent b85759e27c
commit 7ee5a5bc48
6 files changed
+81 -154

No files matched your search

+5 -7
View File
@@ -219,16 +219,14 @@ const AUDIO_INPUTS = {
ok(replacePluginV1Code.includes('copyAndVerify'), 'replaceOriginalFile v1 verifies the copied file');
ok(!replacePluginV1Code.includes('updateProgress'), 'replaceOriginalFile v1 has no progress callback');
const copyHelperCode = require('fs').readFileSync(path.join(ROOT, 'FlowHelpers/1.0.0/copyWithProgress.js'), 'utf8');
ok(copyHelperCode.includes('maxRetries = 2'), 'copy helper retries failed writes');
ok(copyHelperCode.includes('MAX_RETRIES = 2'), 'copy helper retries failed writes');
ok(copyHelperCode.includes('Copy size mismatch'), 'copy helper verifies destination size');
ok(copyHelperCode.includes('fs.unlinkSync(destination)'), 'copy helper removes partial copies before retrying');
ok(copyHelperCode.includes('fs.promises.copyFile(source, destination)'), 'copy helper uses native file copying');
ok(copyHelperCode.includes("copyMethod = 'auto'"), 'copy helper defaults to automatic copy selection');
ok(copyHelperCode.includes("copyMethod === 'stream'"), 'copy helper supports stream fallback');
ok(copyHelperCode.includes('bufferSizeMb = 16'), 'copy helper defaults stream buffer to 16 MB');
ok(copyHelperCode.includes('128'), 'copy helper caps stream buffer size');
ok(copyHelperCode.includes('Math.min(Math.floor((copiedBytes / sourceSize) * 100), 99)'), 'native progress reserves 100% for completed copy');
ok(copyHelperCode.includes('percent <= lastReportedPercent'), 'copy helper reports each progress percentage once');
ok(copyHelperCode.includes('PROGRESS_INTERVAL_MS = 250'), 'copy helper polls progress frequently');
ok(copyHelperCode.includes('intervalSpeed'), 'copy helper reports interval speed');
ok(!copyPluginV2Code.includes('copyMethod'), 'copyToWorkDir v2 has no copy method setting');
ok(!replacePluginCode.includes('bufferSizeMb'), 'replaceOriginalFile v2 has no buffer setting');
// ── Summary ───────────────────────────────────────────────────────────────
console.log(`\n${'='.repeat(55)}`);