diff options
author | Florian Dold <florian@dold.me> | 2021-02-08 13:02:12 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-02-08 13:02:55 +0100 |
commit | 883637d3f287e5026de5bcafb559ff3e6ba1f3bb (patch) | |
tree | cac64b97186a18c071c3e51e2ae74e74802d8235 /packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts | |
parent | 48fa2ccea16e1d0e11d5ac93049bc33df8d47119 (diff) | |
download | wallet-core-883637d3f287e5026de5bcafb559ff3e6ba1f3bb.tar.xz |
allow fault injection callbacks to run async code
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts b/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts index 90a0edf09..44a81b516 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-pay-abort.ts @@ -91,7 +91,7 @@ export async function runPayAbortTest(t: GlobalTestState) { let firstDepositUrl: string | undefined; faultyExchange.faultProxy.addFault({ - modifyRequest(ctx: FaultInjectionRequestContext) { + async modifyRequest(ctx: FaultInjectionRequestContext) { const url = new URL(ctx.requestUrl); if (url.pathname.endsWith("/deposit")) { if (!firstDepositUrl) { @@ -104,7 +104,7 @@ export async function runPayAbortTest(t: GlobalTestState) { } } }, - modifyResponse(ctx: FaultInjectionResponseContext) { + async modifyResponse(ctx: FaultInjectionResponseContext) { const url = new URL(ctx.request.requestUrl); if (url.pathname.endsWith("/deposit") && url.href != firstDepositUrl) { ctx.responseBody = Buffer.from("{}"); @@ -114,7 +114,7 @@ export async function runPayAbortTest(t: GlobalTestState) { }); faultyMerchant.faultProxy.addFault({ - modifyResponse(ctx: FaultInjectionResponseContext) { + async modifyResponse(ctx: FaultInjectionResponseContext) { const url = new URL(ctx.request.requestUrl); if (url.pathname.endsWith("/pay") && url.href != firstDepositUrl) { ctx.responseBody = Buffer.from("{}"); |