From 9a5663056d41ca0b3a695ad4a6bc9ee32b53ddf9 Mon Sep 17 00:00:00 2001 From: Zoe Date: Tue, 11 Feb 2020 12:06:40 +0000 Subject: [PATCH] lint --- .../dialogs/AccessSecretStorageDialog-test.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/components/views/dialogs/AccessSecretStorageDialog-test.js b/test/components/views/dialogs/AccessSecretStorageDialog-test.js index 4e2ade6069..30512ca4dd 100644 --- a/test/components/views/dialogs/AccessSecretStorageDialog-test.js +++ b/test/components/views/dialogs/AccessSecretStorageDialog-test.js @@ -22,46 +22,46 @@ import { stubClient } from '../../../test-utils'; const AccessSecretStorageDialog = sdk.getComponent("dialogs.secretstorage.AccessSecretStorageDialog"); -describe("AccessSecretStorageDialog", function () { +describe("AccessSecretStorageDialog", function() { it("Closes the dialog if _onRecoveryKeyNext is called with a valid key", (done) => { const testInstance = TestRenderer.create( p && p.recoveryKey && p.recoveryKey == "a"} onFinished={(v) => { - if (v) { done() } + if (v) { done(); } }} - /> + />, ); testInstance.getInstance().setState({ recoveryKeyValid: true, recoveryKey: "a", }); - const e = { preventDefault: () => {} } + const e = { preventDefault: () => {} }; testInstance.getInstance()._onRecoveryKeyNext(e); }); - it("Considers a valid key to be valid", function () { + it("Considers a valid key to be valid", function() { const testInstance = TestRenderer.create( true} - /> + />, ); const v = "asfd"; const e = { target: { value: v } }; stubClient(); - MatrixClientPeg.get().isValidRecoveryKey = function (k) { + MatrixClientPeg.get().isValidRecoveryKey = function(k) { return k == v; - } + }; testInstance.getInstance()._onRecoveryKeyChange(e); const { recoveryKeyValid } = testInstance.getInstance().state; expect(recoveryKeyValid).toBe(true); }); - it("Notifies the user if they input an invalid recovery key", async function (done) { + it("Notifies the user if they input an invalid recovery key", async function(done) { const testInstance = TestRenderer.create( false} - /> + />, ); const e = { target: { value: "a" } }; stubClient(); @@ -76,10 +76,10 @@ describe("AccessSecretStorageDialog", function () { expect(notification.props.children).toEqual( ["\uD83D\uDC4E ", "Unable to access secret storage. Please verify that you " + "entered the correct recovery key."]); - done() + done(); }); - it("Notifies the user if they input an invalid passphrase", async function (done) { + it("Notifies the user if they input an invalid passphrase", async function(done) { const testInstance = TestRenderer.create( false} @@ -88,13 +88,13 @@ describe("AccessSecretStorageDialog", function () { salt: 'nonempty', iterations: 2, } } } - /> + />, ); const e = { target: { value: "a" } }; stubClient(); MatrixClientPeg.get().isValidRecoveryKey = () => false; testInstance.getInstance()._onPassPhraseChange(e); - await testInstance.getInstance()._onPassPhraseNext({ preventDefault: () => {} }) + await testInstance.getInstance()._onPassPhraseNext({ preventDefault: () => {} }); const notification = testInstance.root.findByProps({ className: "mx_AccessSecretStorageDialog_keyStatus", });