aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/js/comm/anki-connect.js11
-rw-r--r--test/playwright/playwright-util.js3
2 files changed, 2 insertions, 12 deletions
diff --git a/ext/js/comm/anki-connect.js b/ext/js/comm/anki-connect.js
index a763f394..72ad58a5 100644
--- a/ext/js/comm/anki-connect.js
+++ b/ext/js/comm/anki-connect.js
@@ -130,17 +130,6 @@ export class AnkiConnect {
/**
* @param {import('anki').Note[]} notes
- * @returns {Promise<boolean[]>}
- */
- async canAddNotes(notes) {
- if (!this._enabled) { return []; }
- await this._checkVersion();
- const result = await this._invoke('canAddNotes', {notes});
- return this._normalizeArray(result, notes.length, 'boolean');
- }
-
- /**
- * @param {import('anki').Note[]} notes
* @returns {Promise<({ canAdd: true } | { canAdd: false, error: string })[]>}
*/
async canAddNotesWithErrorDetail(notes) {
diff --git a/test/playwright/playwright-util.js b/test/playwright/playwright-util.js
index 5481eb75..33d35027 100644
--- a/test/playwright/playwright-util.js
+++ b/test/playwright/playwright-util.js
@@ -138,9 +138,10 @@ function getResponseBody(action) {
case 'deckNames': return ['Mock Deck'];
case 'modelNames': return ['Mock Model'];
case 'modelFieldNames': return [...getMockModelFields().keys()];
- case 'canAddNotes': return [true, true];
+ case 'canAddNotesWithErrorDetail': return [{canAdd: true}, {canAdd: true}];
case 'storeMediaFile': return 'mock_audio.mp3';
case 'addNote': return 102312488912;
+ case 'multi': return [];
default: throw new Error(`Unknown action: ${action}`);
}
}