diff options
author | Sebastian <sebasjm@gmail.com> | 2022-11-28 09:29:14 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-11-28 09:29:14 -0300 |
commit | 3577227cc0ff0f9e0c422ae34c4407d88e98ec21 (patch) | |
tree | 837b707dbc7d154c5092e50b0296cb8289e0f1ef /packages/taler-wallet-webextension/src/cta | |
parent | dcddc4c53a59b087c5e48b6b20ed740514257bc8 (diff) | |
download | wallet-core-3577227cc0ff0f9e0c422ae34c4407d88e98ec21.tar.xz |
fix #7496 with unit tests
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta')
6 files changed, 10 insertions, 12 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts index 4ce81dad8..6007b5193 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts +++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts @@ -25,11 +25,10 @@ import { isFuture, parse } from "date-fns"; import { useState } from "preact/hooks"; import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js"; import { useSelectedExchange } from "../../hooks/useSelectedExchange.js"; +import { RecursiveState } from "../../utils/index.js"; import { wxApi } from "../../wxApi.js"; import { Props, State } from "./index.js"; -type RecursiveState<S extends object> = S | (() => RecursiveState<S>); - export function useComponentState( { amount: amountStr, onClose, onSuccess }: Props, api: typeof wxApi, diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/test.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/test.ts index eae4d4ca2..3ebedfd5a 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/test.ts +++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/test.ts @@ -21,8 +21,8 @@ import { expect } from "chai"; -describe("test description", () => { - it("should assert", () => { +describe("Invoice create state", () => { + it.skip("should create some tests", () => { expect([]).deep.equals([]); }); }); diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/test.ts b/packages/taler-wallet-webextension/src/cta/InvoicePay/test.ts index eae4d4ca2..4a3d08ed0 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoicePay/test.ts +++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/test.ts @@ -21,8 +21,8 @@ import { expect } from "chai"; -describe("test description", () => { - it("should assert", () => { +describe("Invoice payment state", () => { + it.skip("should create some states", () => { expect([]).deep.equals([]); }); }); diff --git a/packages/taler-wallet-webextension/src/cta/TransferCreate/test.ts b/packages/taler-wallet-webextension/src/cta/TransferCreate/test.ts index eae4d4ca2..be753e492 100644 --- a/packages/taler-wallet-webextension/src/cta/TransferCreate/test.ts +++ b/packages/taler-wallet-webextension/src/cta/TransferCreate/test.ts @@ -21,8 +21,8 @@ import { expect } from "chai"; -describe("test description", () => { - it("should assert", () => { +describe("Transfer create states", () => { + it.skip("should assert", () => { expect([]).deep.equals([]); }); }); diff --git a/packages/taler-wallet-webextension/src/cta/TransferPickup/test.ts b/packages/taler-wallet-webextension/src/cta/TransferPickup/test.ts index eae4d4ca2..fa5b6979a 100644 --- a/packages/taler-wallet-webextension/src/cta/TransferPickup/test.ts +++ b/packages/taler-wallet-webextension/src/cta/TransferPickup/test.ts @@ -21,8 +21,8 @@ import { expect } from "chai"; -describe("test description", () => { - it("should assert", () => { +describe("Transfer pickup states", () => { + it.skip("should assert", () => { expect([]).deep.equals([]); }); }); diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts index 016027163..9bb29fbd6 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts @@ -25,11 +25,10 @@ import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { useState } from "preact/hooks"; import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js"; import { useSelectedExchange } from "../../hooks/useSelectedExchange.js"; +import { RecursiveState } from "../../utils/index.js"; import { wxApi } from "../../wxApi.js"; import { PropsFromParams, PropsFromURI, State } from "./index.js"; -type RecursiveState<S extends object> = S | (() => RecursiveState<S>); - export function useComponentStateFromParams( { amount, cancel, onSuccess }: PropsFromParams, api: typeof wxApi, |