[MM-47754] Remove update from downloads when "Restart and Upgrade" is clicked (#2299)

* Remove update from downloads when "Restart and Upgrade" is clicked

* Fix failing test

* Mock downloadsManager in autoUpdater tests
This commit is contained in:
Tasos Boulis
2022-10-21 13:27:24 +03:00
committed by GitHub
parent aa28948800
commit 167f7d832a
4 changed files with 16 additions and 5 deletions

View File

@@ -31,9 +31,9 @@ export default class JsonFileManager<T> {
});
}
setJson(json: T): void {
async setJson(json: T): Promise<void> {
this.json = json;
this.writeToFile();
await this.writeToFile();
}
setValue(key: keyof T, value: T[keyof T]): void {