diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-09-05 20:00:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-05 20:00:08 -0400 |
commit | 97a80276f6ce5834ab1b9ad12309df4f6f2f3ec5 (patch) | |
tree | 28aa37aa95832cd51d55011ded62dfdbb649703e /test/test-database.js | |
parent | f68ad1f843607d4ba1ad216fe16305c420cee8d6 (diff) |
Database readwrite transaction updates (#1932)
* Add _readWriteTransaction helper
* Improve deleteDictionary order
* Make onProgress event optional
* Simplify progress rate parameter
Diffstat (limited to 'test/test-database.js')
-rw-r--r-- | test/test-database.js | 4 |
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}])); |