taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 4ec57e7b2396378c12900e99d5ec8214e44bf766
parent 74fa4b3e392908bf99450a23f80b40a65897dd83
Author: Florian Dold <florian@dold.me>
Date:   Thu,  4 Apr 2024 16:11:03 +0200

-make test work

Diffstat:
Mpackages/taler-harness/src/harness/helpers.ts | 2+-
Mpackages/taler-harness/src/integrationtests/test-payment.ts | 18+++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts @@ -448,7 +448,7 @@ export async function createSimpleTestkudosEnvironmentV3( database: db.connStr, }); - const receiverName = "Exchange"; + const receiverName = "exchange"; const exchangeBankUsername = "exchange"; const exchangeBankPassword = "mypw"; const exchangePlainPayto = opts.withLibeufin === true diff --git a/packages/taler-harness/src/integrationtests/test-payment.ts b/packages/taler-harness/src/integrationtests/test-payment.ts @@ -17,14 +17,14 @@ /** * Imports. */ +import { j2s } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV3, - withdrawViaBankV3, makeTestPaymentV2, + withdrawViaBankV2, } from "../harness/helpers.js"; -import { j2s } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal and payment. @@ -32,19 +32,23 @@ import { j2s } from "@gnu-taler/taler-util"; export async function runPaymentTest(t: GlobalTestState) { // Set up test environment - const { walletClient, bankClient, exchange, merchant } = + const { bank, walletClient, exchange, merchant } = await createSimpleTestkudosEnvironmentV3(t, undefined, { withLibeufin: false, }); // Withdraw digital cash into the wallet. - - t.assertTrue(bankClient !== undefined); - await withdrawViaBankV3(t, { walletClient, bankClient, exchange, amount: "TESTKUDOS:20" }); + + await withdrawViaBankV2(t, { + walletClient, + exchange, + amount: "TESTKUDOS:20", + bank, + }); await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); - console.log("line 51") + console.log("line 51"); const order = { summary: "Buy me!",