aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test-database.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test-database.js b/test/test-database.js
index 63989857..03b2bd3b 100644
--- a/test/test-database.js
+++ b/test/test-database.js
@@ -115,6 +115,7 @@ vm.execute([
'bg/js/media-utility.js',
'bg/js/request.js',
'bg/js/dictionary-importer.js',
+ 'bg/js/generic-database.js',
'bg/js/database.js'
]);
const DictionaryImporter = vm.get('DictionaryImporter');
@@ -242,8 +243,8 @@ async function testDatabase1() {
true
);
vm.assert.deepStrictEqual(counts, {
- counts: [{kanji: 2, kanjiMeta: 2, terms: 33, termMeta: 12, tagMeta: 14}],
- total: {kanji: 2, kanjiMeta: 2, terms: 33, termMeta: 12, tagMeta: 14}
+ counts: [{kanji: 2, kanjiMeta: 2, terms: 33, termMeta: 12, tagMeta: 14, media: 1}],
+ total: {kanji: 2, kanjiMeta: 2, terms: 33, termMeta: 12, tagMeta: 14, media: 1}
});
// Test find* functions
@@ -269,7 +270,7 @@ async function testDatabaseEmpty1(database) {
const counts = await database.getDictionaryCounts([], true);
vm.assert.deepStrictEqual(counts, {
counts: [],
- total: {kanji: 0, kanjiMeta: 0, terms: 0, termMeta: 0, tagMeta: 0}
+ total: {kanji: 0, kanjiMeta: 0, terms: 0, termMeta: 0, tagMeta: 0, media: 0}
});
}
@@ -863,8 +864,7 @@ async function testDatabase2() {
const database = new Database();
// Error: not prepared
- await assert.rejects(async () => await database.purge());
- await assert.rejects(async () => await database.deleteDictionary(title, {}, () => {}));
+ await assert.rejects(async () => await database.deleteDictionary(title, {rate: 1000}, () => {}));
await assert.rejects(async () => await database.findTermsBulk(['?'], titles, null));
await assert.rejects(async () => await database.findTermsExactBulk(['?'], ['?'], titles));
await assert.rejects(async () => await database.findTermsBySequenceBulk([1], title));