aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli/src/integrationtests/helpers.ts
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-02-15 20:28:09 +0100
committerMS <ms@taler.net>2021-02-15 20:28:09 +0100
commitd384bd5c62198f1160119e60776350109a8ca7d3 (patch)
tree51f013844c6ecaf56f7e4389e1cae9c5a241ac7a /packages/taler-wallet-cli/src/integrationtests/helpers.ts
parent7a2ab04da8548d9b409df1ab183c785c7bde7e48 (diff)
downloadwallet-core-d384bd5c62198f1160119e60776350109a8ca7d3.tar.xz
TWG, payments reversal testing.
Up to the point where the payments to be reversed get created via the native Sandbox API, instead of the add-incoming API, that got recently removed from the Nexus implementation.
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/helpers.ts')
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/helpers.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/helpers.ts b/packages/taler-wallet-cli/src/integrationtests/helpers.ts
index 0bd6750d9..bca983758 100644
--- a/packages/taler-wallet-cli/src/integrationtests/helpers.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/helpers.ts
@@ -60,6 +60,16 @@ export interface SimpleTestEnvironment {
wallet: WalletCli;
}
+export function getRandomIban(countryCode: string): string {
+ return `${countryCode}715001051796${(Math.random() * 100000000)
+ .toString()
+ .substring(0, 8)}`;
+}
+
+export function getRandomString(): string {
+ return Math.random().toString(36).substring(2);
+}
+
/**
* Run a test case with a simple TESTKUDOS Taler environment, consisting
* of one exchange, one bank and one merchant.