aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts21
1 files changed, 6 insertions, 15 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts
index 8b8b45c40..f3e3802e5 100644
--- a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts
+++ b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts
@@ -18,14 +18,12 @@
* Imports.
*/
import {
- Amounts,
ConfirmPayResultType,
Duration,
MerchantApiClient,
NotificationType,
PreparePayResultType,
TalerCorebankApiClient,
- j2s,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { makeNoFeeCoinConfig } from "../harness/denomStructures.js";
@@ -134,6 +132,7 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) {
const { walletClient } = await createWalletDaemonWithClient(t, {
name: "w1",
+ persistent: true,
});
const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
@@ -160,9 +159,7 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) {
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
{
const balance = await walletClient.call(WalletApiOperation.GetBalances, {});
- t.assertTrue(
- Amounts.cmp(balance.balances[0].available, "TESTKUDOS:15") === 0,
- );
+ t.assertAmountEquals(balance.balances[0].available, "TESTKUDOS:15");
}
// Travel into the future, the deposit expiration is two years
@@ -180,13 +177,11 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) {
// The time travel should cause exchanges to update.
t.logStep("The time travel should cause exchanges to update");
await exchangeUpdated1Cond;
- t.logStep("exchange updated, wahting tx");
+ t.logStep("exchange updated, waiting for tx");
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
{
const balance = await walletClient.call(WalletApiOperation.GetBalances, {});
- t.assertTrue(
- Amounts.cmp(balance.balances[0].available, "TESTKUDOS:15") === 0,
- );
+ t.assertAmountEquals(balance.balances[0].available, "TESTKUDOS:15");
}
t.logStep("withdrawing second time");
@@ -203,9 +198,7 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) {
{
const balance = await walletClient.call(WalletApiOperation.GetBalances, {});
- t.assertTrue(
- Amounts.cmp(balance.balances[0].available, "TESTKUDOS:35") === 0,
- );
+ t.assertAmountEquals(balance.balances[0].available, "TESTKUDOS:35");
}
const exchangeUpdated2Cond = walletClient.waitForNotificationCond(
@@ -232,9 +225,7 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) {
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
{
const balance = await walletClient.call(WalletApiOperation.GetBalances, {});
- t.assertTrue(
- Amounts.cmp(balance.balances[0].available, "TESTKUDOS:35") === 0,
- );
+ t.assertAmountEquals(balance.balances[0].available, "TESTKUDOS:35");
}
// At this point, the original coins should've been refreshed.