From fb6aff76d2152d95caa2ba6cb0d91cb01e0687fe Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 6 Jun 2022 00:09:25 -0300 Subject: prettier --- .../src/hooks/useTalerActionURL.test.ts | 39 +++++++++++----------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts') diff --git a/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts b/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts index 4893d43ff..7cf97265e 100644 --- a/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts +++ b/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts @@ -14,48 +14,47 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see */ -import { useTalerActionURL } from "./useTalerActionURL.js" +import { useTalerActionURL } from "./useTalerActionURL.js"; import { mountHook } from "../test-utils.js"; import { IoCProviderForTesting } from "../context/iocContext.js"; import { h, VNode } from "preact"; import { expect } from "chai"; -describe('useTalerActionURL hook', () => { - - it('should be set url to undefined when dismiss', async () => { - +describe("useTalerActionURL hook", () => { + it("should be set url to undefined when dismiss", async () => { const ctx = ({ children }: { children: any }): VNode => { return h(IoCProviderForTesting, { value: { findTalerUriInActiveTab: async () => "asd", - }, children - }) - } + }, + children, + }); + }; - const { getLastResultOrThrow, waitNextUpdate, assertNoPendingUpdate } = mountHook(useTalerActionURL, ctx) + const { getLastResultOrThrow, waitNextUpdate, assertNoPendingUpdate } = + mountHook(useTalerActionURL, ctx); { - const [url] = getLastResultOrThrow() + const [url] = getLastResultOrThrow(); expect(url).undefined; } - - await waitNextUpdate("waiting for useEffect") + await waitNextUpdate("waiting for useEffect"); { - const [url, setDismissed] = getLastResultOrThrow() + const [url, setDismissed] = getLastResultOrThrow(); expect(url).equals("asd"); - setDismissed(true) + setDismissed(true); } - await waitNextUpdate("after dismiss") + await waitNextUpdate("after dismiss"); { - const [url] = getLastResultOrThrow() - if (url !== undefined) throw Error('invalid') + const [url] = getLastResultOrThrow(); + if (url !== undefined) throw Error("invalid"); expect(url).undefined; } - await assertNoPendingUpdate() - }) -}) \ No newline at end of file + await assertNoPendingUpdate(); + }); +}); -- cgit v1.2.3