diff options
author | Florian Dold <florian@dold.me> | 2023-06-30 16:14:58 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-06-30 16:14:58 +0200 |
commit | d4ee96138774e8bc469f172bbb6276af89d6f240 (patch) | |
tree | eda5bc6833306727f711cc5aedd5f307fa8b1f67 /packages/taler-wallet-core/src/operations/testing.ts | |
parent | 7523ffa9105f71a6a4c201d3ee46dbfccc929cea (diff) | |
download | wallet-core-d4ee96138774e8bc469f172bbb6276af89d6f240.tar.xz |
wallet-core: rename OperationAttempt->TaskRun, do not allow task result values anymore
Diffstat (limited to 'packages/taler-wallet-core/src/operations/testing.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/testing.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/testing.ts b/packages/taler-wallet-core/src/operations/testing.ts index ece71439c..77e218cd7 100644 --- a/packages/taler-wallet-core/src/operations/testing.ts +++ b/packages/taler-wallet-core/src/operations/testing.ts @@ -24,6 +24,7 @@ import { Duration, IntegrationTestV2Args, Logger, + NotificationType, stringToBytes, TestPayResult, WithdrawTestBalanceRequest, @@ -64,6 +65,7 @@ import { confirmPeerPushCredit, } from "./pay-peer-push-credit.js"; import { initiatePeerPushDebit } from "./pay-peer-push-debit.js"; +import { OpenedPromise, openPromise } from "../index.js"; const logger = new Logger("operations/testing.ts"); @@ -445,6 +447,18 @@ export async function runIntegrationTest( logger.trace("integration test: all done!"); } +async function waitUntilDone(ws: InternalWalletState): Promise<void> { + let p: OpenedPromise<void> | undefined = undefined; + ws.addNotificationListener((notif) => { + if (!p) { + return; + } + if (notif.type === NotificationType.TransactionStateTransition) { + p.resolve(); + } + }); +} + export async function runIntegrationTest2( ws: InternalWalletState, args: IntegrationTestV2Args, |