mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
feat(jimaku): auto-open modal when a video has no Japanese subtitle (#319)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Ivan Melck <ivan@spec-kitty.ai>
This commit is contained in:
24 files changed
+907
-22
No files matched your search
@@ -57,3 +57,18 @@ test('resolveConfig warns for invalid mpv launch mode', () => {
|
||||
message: "Expected one of: 'normal', 'maximized', 'fullscreen'.",
|
||||
});
|
||||
});
|
||||
|
||||
test('resolveConfig parses the Jimaku auto-open toggle and warns on non-boolean values', () => {
|
||||
const enabled = resolveConfig({ jimaku: { autoOpenWhenPrimarySubtitleMissing: true } });
|
||||
assert.equal(enabled.resolved.jimaku.autoOpenWhenPrimarySubtitleMissing, true);
|
||||
assert.deepEqual(enabled.warnings, []);
|
||||
|
||||
const invalid = resolveConfig({
|
||||
jimaku: { autoOpenWhenPrimarySubtitleMissing: 'sometimes' as never },
|
||||
});
|
||||
assert.equal(invalid.resolved.jimaku.autoOpenWhenPrimarySubtitleMissing, false);
|
||||
assert.deepEqual(
|
||||
invalid.warnings.map((warning) => warning.path),
|
||||
['jimaku.autoOpenWhenPrimarySubtitleMissing'],
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user