1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-05 17:02:07 +03:00

Fix backup tests

This commit is contained in:
J. Ryan Stinnett
2019-12-12 16:06:46 +00:00
parent f2c5b2bd49
commit 1fc2ab7f7d
2 changed files with 3 additions and 3 deletions

View File

@@ -336,7 +336,7 @@ describe("MegolmBackup", function() {
});
await client.resetCrossSigningKeys();
let numCalls = 0;
await new Promise(async (resolve, reject) => {
await new Promise((resolve, reject) => {
client._http.authedRequest = function(
callback, method, path, queryParams, data, opts,
) {
@@ -361,7 +361,7 @@ describe("MegolmBackup", function() {
resolve();
return Promise.resolve({});
};
await client.createKeyBackupVersion({
client.createKeyBackupVersion({
algorithm: "m.megolm_backup.v1",
auth_data: {
public_key: "hSDwCYkwp1R0i33ctD73Wg2/Og0mOBr066SpjqqbTmo",

View File

@@ -1519,7 +1519,7 @@ MatrixClient.prototype.createKeyBackupVersion = async function(info) {
// sessions.
await this.checkKeyBackup();
if (!this.getKeyBackupEnabled()) {
throw new Error("Key backup not usable even though we just created it");
logger.error("Key backup not usable even though we just created it");
}
return res;