mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 16:46:06 -08:00
test: cut low-value tests, rewrite the rest around behavior, parallelize lanes (#285)
This commit is contained in:
1 parent
4b6842d034
commit
b48083ddd8
368 files changed
+18045
-60331
No files matched your search
@@ -3,35 +3,7 @@ import test from 'node:test';
|
||||
import { parseSubtitleCues } from '../../core/services/subtitle-cue-parser';
|
||||
import { createSubtitleProcessingController } from '../../core/services/subtitle-processing-controller';
|
||||
import type { SubtitleData } from '../../types';
|
||||
import {
|
||||
createAutoplaySubtitlePrimingRuntime,
|
||||
setMpvCurrentSecondarySubText,
|
||||
} from './autoplay-subtitle-priming-runtime';
|
||||
|
||||
test('setMpvCurrentSecondarySubText uses client setter when available', () => {
|
||||
const calls: string[] = [];
|
||||
const client = {
|
||||
currentSecondarySubText: '',
|
||||
setCurrentSecondarySubText: (text: string) => {
|
||||
calls.push(text);
|
||||
},
|
||||
};
|
||||
|
||||
setMpvCurrentSecondarySubText(client, 'secondary');
|
||||
|
||||
assert.deepEqual(calls, ['secondary']);
|
||||
assert.equal(client.currentSecondarySubText, '');
|
||||
});
|
||||
|
||||
test('setMpvCurrentSecondarySubText updates client property when setter is unavailable', () => {
|
||||
const client = {
|
||||
currentSecondarySubText: '',
|
||||
};
|
||||
|
||||
setMpvCurrentSecondarySubText(client, 'secondary');
|
||||
|
||||
assert.equal(client.currentSecondarySubText, 'secondary');
|
||||
});
|
||||
import { createAutoplaySubtitlePrimingRuntime } from './autoplay-subtitle-priming-runtime';
|
||||
|
||||
test('scheduleSubtitlePrefetchRefresh logs refresh failures from timer callback', async () => {
|
||||
const logs: string[] = [];
|
||||
|
||||
Reference in new issue
Block a user