mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
1.6 KiB
1.6 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, references, parent_task_id, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | references | parent_task_id | ordinal | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-2.4 | Add tests for anki jimaku service | Done |
|
2026-02-10 18:56 | 2026-02-11 03:35 |
|
|
TASK-2 | 6000 |
Description
Add dedicated tests for anki-jimaku-service.ts focusing on IPC handler registration, request dispatch, and error handling behavior.
Acceptance Criteria
- #1 IPC registration behavior is validated for all channels exposed by this service.
- #2 Success-path behavior for core handler flows is validated.
- #3 Failure-path behavior is validated with expected error propagation.
- #4
pnpm run test:coreremains green.
Implementation Notes
Added a lightweight registration-injection seam to registerAnkiJimakuIpcRuntimeService so runtime behavior can be tested without Electron IPC globals.
Added src/core/services/anki-jimaku-service.test.ts with coverage for:
- runtime handler surface registration
- integration disable path and runtime-options broadcast
- subtitle history clear and field-grouping response callbacks
- merge-preview guard error and integration success delegation
- Jimaku search request mapping/result capping
- downloaded-subtitle MPV command forwarding
Updated package.json test:core to include dist/core/services/anki-jimaku-service.test.js.
Verification: pnpm run test:core passed (21/21).