mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -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
@@ -130,39 +130,6 @@ test('startBackgroundWarmups schedules jellyfin warmup when all jellyfin flags a
|
||||
assert.deepEqual(labels, ['subtitle-tokenization', 'jellyfin-remote-session']);
|
||||
});
|
||||
|
||||
test('startBackgroundWarmups skips jellyfin warmup when warmup is deferred', () => {
|
||||
const labels: string[] = [];
|
||||
let started = false;
|
||||
const startWarmups = createStartBackgroundWarmupsHandler({
|
||||
getStarted: () => started,
|
||||
setStarted: (value) => {
|
||||
started = value;
|
||||
},
|
||||
isTexthookerOnlyMode: () => false,
|
||||
launchTask: (label) => {
|
||||
labels.push(label);
|
||||
},
|
||||
createMecabTokenizerAndCheck: async () => {},
|
||||
ensureYomitanExtensionLoaded: async () => {},
|
||||
prewarmSubtitleDictionaries: async () => {},
|
||||
shouldWarmupMecab: () => false,
|
||||
shouldWarmupYomitanExtension: () => true,
|
||||
shouldWarmupSubtitleDictionaries: () => false,
|
||||
shouldWarmupJellyfinRemoteSession: () => false,
|
||||
shouldAutoConnectJellyfinRemote: () =>
|
||||
shouldAutoConnectJellyfinRemote({
|
||||
enabled: true,
|
||||
remoteControlEnabled: true,
|
||||
remoteControlAutoConnect: true,
|
||||
}),
|
||||
startJellyfinRemoteSession: async () => {},
|
||||
});
|
||||
|
||||
startWarmups();
|
||||
assert.equal(started, true);
|
||||
assert.deepEqual(labels, ['subtitle-tokenization']);
|
||||
});
|
||||
|
||||
test('startBackgroundWarmups logs per-stage progress for enabled tokenization warmups', async () => {
|
||||
const debugLogs: string[] = [];
|
||||
const labels: string[] = [];
|
||||
|
||||
Reference in new issue
Block a user