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:
authored and GitHub committed 2026-11-03 23:12:46 -08:00
1 parent d8c2315405
commit 33f5f890d5
24 files changed
+907 -22

No files matched your search

+15
View File
@@ -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'],
);
});