mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Tools: Fixed tests
This commit is contained in:
parent
3223fd26f4
commit
ca8b05631a
@ -508,6 +508,7 @@ async function expectNotThrow(asyncFn) {
|
||||
}
|
||||
|
||||
if (thrownError) {
|
||||
console.error(thrownError);
|
||||
expect(thrownError.message).toBe('', 'Expected function not to throw an error but it did');
|
||||
} else {
|
||||
expect(true).toBe(true);
|
||||
|
@ -92,8 +92,7 @@ export default class KvStore extends BaseService {
|
||||
|
||||
try {
|
||||
const result = await this.db().selectOne('SELECT `value`, `type` FROM key_values WHERE `key` = ?', [key]);
|
||||
const value = this.formatValue_(result.value, result.type) as ValueType.Int;
|
||||
const newValue = result ? value + inc : inc;
|
||||
const newValue = result ? (this.formatValue_(result.value, result.type) as ValueType.Int) + inc : inc;
|
||||
await this.setValue(key, newValue);
|
||||
release();
|
||||
return newValue;
|
||||
|
Loading…
Reference in New Issue
Block a user