From 958c01b8075b8283d70d5046ca8890e6e9e6a596 Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 2 May 2022 14:09:01 +0200 Subject: [PATCH] Fix code style --- src/DecryptionFailureTracker.ts | 2 +- test/DecryptionFailureTracker-test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DecryptionFailureTracker.ts b/src/DecryptionFailureTracker.ts index da0341418ff..c56b245f259 100644 --- a/src/DecryptionFailureTracker.ts +++ b/src/DecryptionFailureTracker.ts @@ -43,7 +43,7 @@ export class DecryptionFailureTracker { eventName: "Error", domain: "E2EE", name: errorCode, - context: `mxc_crypto_error_type_${rawError}` + context: `mxc_crypto_error_type_${rawError}`, }); } }, (errorCode) => { diff --git a/test/DecryptionFailureTracker-test.js b/test/DecryptionFailureTracker-test.js index ca78a058554..997c4913c3d 100644 --- a/test/DecryptionFailureTracker-test.js +++ b/test/DecryptionFailureTracker-test.js @@ -63,8 +63,8 @@ describe('DecryptionFailureTracker', function() { let count = 0; let reportedRawCode = ""; const tracker = new DecryptionFailureTracker((total, errcode, rawCode) => { - count += total - reportedRawCode = rawCode + count += total; + reportedRawCode = rawCode; }, () => "UnknownError"); tracker.addVisibleEvent(failedDecryptionEvent); @@ -79,7 +79,7 @@ describe('DecryptionFailureTracker', function() { tracker.trackFailures(); expect(count).not.toBe(0, 'should track a failure for an event that failed decryption'); - expect(reportedRawCode).toBe('INBOUND_SESSION_MISMATCH_ROOM_ID', 'Should add the rawCode to the event context') + expect(reportedRawCode).toBe('INBOUND_SESSION_MISMATCH_ROOM_ID', 'Should add the rawCode to the event context'); done(); });