feat(yomitan): add read-only external profile support for shared dictionaries (#18)

This commit is contained in:
2026-03-12 01:17:34 -07:00
committed by GitHub
parent 68833c76c4
commit 1b56360a24
67 changed files with 1230 additions and 135 deletions

View File

@@ -22,14 +22,16 @@ test('yomitan opener warns when extension cannot be loaded', async () => {
});
test('yomitan opener opens settings window when extension is available', async () => {
let opened = false;
let forwardedSession: { id: string } | null | undefined;
const yomitanSession = { id: 'session' };
const openSettings = createOpenYomitanSettingsHandler({
ensureYomitanExtensionLoaded: async () => ({ id: 'ext' }),
openYomitanSettingsWindow: () => {
opened = true;
openYomitanSettingsWindow: ({ yomitanSession: nextSession }) => {
forwardedSession = nextSession as { id: string } | null;
},
getExistingWindow: () => null,
setWindow: () => {},
getYomitanSession: () => yomitanSession,
logWarn: () => {},
logError: () => {},
});
@@ -37,5 +39,5 @@ test('yomitan opener opens settings window when extension is available', async (
openSettings();
await Promise.resolve();
await Promise.resolve();
assert.equal(opened, true);
assert.equal(forwardedSession, yomitanSession);
});