feat(config): add configuration window (#70)

This commit is contained in:
2026-05-21 04:16:21 -07:00
committed by GitHub
parent a54f03f0cd
commit dc52bc2fba
287 changed files with 14507 additions and 8134 deletions
+24
View File
@@ -8,3 +8,27 @@ test('settings preload stays sandbox-compatible by avoiding local runtime import
assert.doesNotMatch(source, /from\s+['"]\.\/shared\/ipc\/contracts(?:\.(?:js|ts))?['"]/);
});
test('settings preload exposes Anki lookup helpers', () => {
const source = fs.readFileSync(path.join(process.cwd(), 'src', 'preload-settings.ts'), 'utf8');
for (const method of [
'getAnkiDeckNames',
'getAnkiDeckFieldNames',
'getAnkiDeckModelNames',
'getAnkiModelNames',
'getAnkiModelFieldNames',
]) {
assert.match(source, new RegExp(`${method}:`));
}
});
test('overlay preload buffers only latest subtitle state until renderer listener registration', () => {
const source = fs.readFileSync(path.join(process.cwd(), 'src', 'preload.ts'), 'utf8');
assert.match(
source,
/const onSubtitleSetEvent =\s*createLatestValueIpcListenerWithPayload<SubtitleData>\(\s*IPC_CHANNELS\.event\.subtitleSet,/,
);
assert.match(source, /onSubtitle:\s*\(callback:[\s\S]+?onSubtitleSetEvent\(callback\);/);
});