aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-09-05 20:00:08 -0400
committerGitHub <noreply@github.com>2021-09-05 20:00:08 -0400
commit97a80276f6ce5834ab1b9ad12309df4f6f2f3ec5 (patch)
tree28aa37aa95832cd51d55011ded62dfdbb649703e /test
parentf68ad1f843607d4ba1ad216fe16305c420cee8d6 (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}]));