From 97a80276f6ce5834ab1b9ad12309df4f6f2f3ec5 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 5 Sep 2021 20:00:08 -0400 Subject: Database readwrite transaction updates (#1932) * Add _readWriteTransaction helper * Improve deleteDictionary order * Make onProgress event optional * Simplify progress rate parameter --- test/test-database.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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}])); -- cgit v1.2.3