mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-01 06:12:07 -07:00
feat: streamline Kiku duplicate grouping and popup flow
This commit is contained in:
@@ -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],
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user