summaryrefslogtreecommitdiff
path: root/test/test-database.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-database.js')
-rw-r--r--test/test-database.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/test-database.js b/test/test-database.js
index b9ac8a46..d66e2137 100644
--- a/test/test-database.js
+++ b/test/test-database.js
@@ -83,26 +83,30 @@ async function testDatabase1() {
await database.prepare();
for (const {cleanup} of iterations) {
+ const expectedSummary = {
+ title,
+ revision: 'test',
+ sequenced: true,
+ version: 3,
+ prefixWildcardsSupported: true
+ };
+
// Import data
let progressEvent = false;
- await database.importDictionary(
+ const {result, errors} = await database.importDictionary(
testDictionarySource,
() => {
progressEvent = true;
},
{prefixWildcardsSupported: true}
);
+ assert.deepStrictEqual(errors, []);
+ assert.deepStrictEqual(result, expectedSummary);
assert.ok(progressEvent);
// Get info summary
const info = await database.getDictionaryInfo();
- assert.deepStrictEqual(info, [{
- title,
- revision: 'test',
- sequenced: true,
- version: 3,
- prefixWildcardsSupported: true
- }]);
+ assert.deepStrictEqual(info, [expectedSummary]);
// Get counts
const counts = await database.getDictionaryCounts(