feat: streamline Kiku duplicate grouping and popup flow

This commit is contained in:
2026-03-31 22:23:02 -07:00
parent 3502cdc607
commit a5faef5aee
25 changed files with 864 additions and 25 deletions

View File

@@ -5,6 +5,7 @@ import * as path from 'path';
import test from 'node:test';
import * as vm from 'node:vm';
import {
addYomitanNoteViaSearch,
getYomitanDictionaryInfo,
importYomitanDictionaryFromZip,
deleteYomitanDictionaryByTitle,
@@ -1373,3 +1374,19 @@ test('deleteYomitanDictionaryByTitle uses settings automation bridge instead of
false,
);
});
test('addYomitanNoteViaSearch returns note and duplicate ids from the bridge payload', async () => {
const deps = createDeps(async (_script) => ({
noteId: 42,
duplicateNoteIds: [18, 7, 18],
}));
const result = await addYomitanNoteViaSearch('食べる', deps, {
error: () => undefined,
});
assert.deepEqual(result, {
noteId: 42,
duplicateNoteIds: [18, 7, 18],
});
});