summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-09-05 20:00:08 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-09-11 16:05:39 -0400
commit048089ec698fb8237fa0cd5df668f4cfc0b83cab (patch)
treedc21ebff4e7b9c945fade92cf17a1a7d886522a3 /test
parenta9f41238d3cda62bc194f6c6cb08bae2c4eb512c (diff)
Database readwrite transaction updates (#1932)
* Add _readWriteTransaction helper * Improve deleteDictionary order * Make onProgress event optional * Simplify progress rate parameter
Diffstat (limited to 'test')
-rw-r--r--test/test-database.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-database.js b/test/test-database.js
index e855f07f..a87a3f72 100644
--- a/test/test-database.js
+++ b/test/test-database.js
@@ -122,7 +122,7 @@ async function testDatabase1() {
let progressEvent = false;
await dictionaryDatabase.deleteDictionary(
title,
- {rate: 1000},
+ 1000,
() => {
progressEvent = true;
}
@@ -788,7 +788,7 @@ async function testDatabase2() {
const dictionaryDatabase = new DictionaryDatabase();
// Error: not prepared
- await assert.rejects(async () => await dictionaryDatabase.deleteDictionary(title, {rate: 1000}, () => {}));
+ await assert.rejects(async () => await dictionaryDatabase.deleteDictionary(title, 1000));
await assert.rejects(async () => await dictionaryDatabase.findTermsBulk(['?'], titles, null));
await assert.rejects(async () => await dictionaryDatabase.findTermsExactBulk([{term: '?', reading: '?'}], titles));
await assert.rejects(async () => await dictionaryDatabase.findTermsBySequenceBulk([{query: 1, dictionary: title}]));