summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test-anki-note-builder.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/test-anki-note-builder.js b/test/test-anki-note-builder.js
index 2517e521..97489aa8 100644
--- a/test/test-anki-note-builder.js
+++ b/test/test-anki-note-builder.js
@@ -219,8 +219,7 @@ async function getRenderResults(dictionaryEntries, type, mode, template, AnkiNot
query: 'query',
fullQuery: 'fullQuery'
};
- const errors = [];
- const noteFields = (await ankiNoteBuilder.createNote({
+ const {note: {fields: noteFields}, errors} = await ankiNoteBuilder.createNote({
dictionaryEntry,
mode: null,
context,
@@ -234,11 +233,10 @@ async function getRenderResults(dictionaryEntries, type, mode, template, AnkiNot
duplicateScope: 'collection',
resultOutputMode: mode,
glossaryLayoutMode: 'default',
- compactTags: false,
- errors
- })).fields;
+ compactTags: false
+ });
if (!write) {
- assert.deepStrictEqual(errors, []);
+ assert.strictEqual(errors.length, 0);
}
results.push(noteFields);
}