From bbe6f6a04aa15cecf32de5d242eb3bef6d0a77c2 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Wed, 11 Dec 2024 13:34:01 -0500 Subject: [PATCH] chore: `await` `deleteTestKeys` - get rid of dangling promise and await something we actually rely on --- multichain-testing/test/account-balance-queries.test.ts | 2 +- multichain-testing/test/auto-stake-it.test.ts | 2 +- multichain-testing/test/basic-flows.test.ts | 2 +- multichain-testing/test/chain-queries.test.ts | 2 +- multichain-testing/test/deposit-withdraw-lca.test.ts | 2 +- multichain-testing/test/deposit-withdraw-portfolio.test.ts | 2 +- multichain-testing/test/fast-usdc/fast-usdc.test.ts | 2 +- multichain-testing/test/ica-channel-close.test.ts | 2 +- multichain-testing/test/send-anywhere.test.ts | 2 +- multichain-testing/test/stake-ica.test.ts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/multichain-testing/test/account-balance-queries.test.ts b/multichain-testing/test/account-balance-queries.test.ts index 6707d9b102e..c067ced9446 100644 --- a/multichain-testing/test/account-balance-queries.test.ts +++ b/multichain-testing/test/account-balance-queries.test.ts @@ -20,7 +20,7 @@ const contractBuilder = test.before(async t => { const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...rest, wallets, deleteTestKeys }; const { startContract } = rest; diff --git a/multichain-testing/test/auto-stake-it.test.ts b/multichain-testing/test/auto-stake-it.test.ts index 01afae775f2..10e3bac8db8 100644 --- a/multichain-testing/test/auto-stake-it.test.ts +++ b/multichain-testing/test/auto-stake-it.test.ts @@ -19,7 +19,7 @@ const contractBuilder = test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t); const { commonBuilderOpts, deleteTestKeys, startContract } = common; - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, commonBuilderOpts); diff --git a/multichain-testing/test/basic-flows.test.ts b/multichain-testing/test/basic-flows.test.ts index 9e9ff738a4d..1d53b4aae8d 100644 --- a/multichain-testing/test/basic-flows.test.ts +++ b/multichain-testing/test/basic-flows.test.ts @@ -18,7 +18,7 @@ const contractBuilder = test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t); const { commonBuilderOpts, deleteTestKeys, startContract } = common; - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, commonBuilderOpts); diff --git a/multichain-testing/test/chain-queries.test.ts b/multichain-testing/test/chain-queries.test.ts index a9b91c97fe3..56673742582 100644 --- a/multichain-testing/test/chain-queries.test.ts +++ b/multichain-testing/test/chain-queries.test.ts @@ -28,7 +28,7 @@ const contractBuilder = test.before(async t => { const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...rest, wallets, deleteTestKeys }; const { startContract } = rest; diff --git a/multichain-testing/test/deposit-withdraw-lca.test.ts b/multichain-testing/test/deposit-withdraw-lca.test.ts index e9127f3919a..7d1cbafa97c 100644 --- a/multichain-testing/test/deposit-withdraw-lca.test.ts +++ b/multichain-testing/test/deposit-withdraw-lca.test.ts @@ -16,7 +16,7 @@ const contractBuilder = test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t); const { commonBuilderOpts, deleteTestKeys, startContract } = common; - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, commonBuilderOpts); diff --git a/multichain-testing/test/deposit-withdraw-portfolio.test.ts b/multichain-testing/test/deposit-withdraw-portfolio.test.ts index 0bccf0bad60..49b7f3d8ad7 100644 --- a/multichain-testing/test/deposit-withdraw-portfolio.test.ts +++ b/multichain-testing/test/deposit-withdraw-portfolio.test.ts @@ -16,7 +16,7 @@ const contractBuilder = test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t); const { commonBuilderOpts, deleteTestKeys, startContract } = common; - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, commonBuilderOpts); diff --git a/multichain-testing/test/fast-usdc/fast-usdc.test.ts b/multichain-testing/test/fast-usdc/fast-usdc.test.ts index d7610fce210..dec4f246030 100644 --- a/multichain-testing/test/fast-usdc/fast-usdc.test.ts +++ b/multichain-testing/test/fast-usdc/fast-usdc.test.ts @@ -45,7 +45,7 @@ test.before(async t => { provisionSmartWallet, startContract, } = common; - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts, values(oracleMnemonics)); // provision oracle wallets first so invitation deposits don't fail diff --git a/multichain-testing/test/ica-channel-close.test.ts b/multichain-testing/test/ica-channel-close.test.ts index f7799dac1e0..6ee59dc825f 100644 --- a/multichain-testing/test/ica-channel-close.test.ts +++ b/multichain-testing/test/ica-channel-close.test.ts @@ -24,7 +24,7 @@ const contractBuilder = test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t); const { commonBuilderOpts, deleteTestKeys, startContract } = common; - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, commonBuilderOpts); diff --git a/multichain-testing/test/send-anywhere.test.ts b/multichain-testing/test/send-anywhere.test.ts index c33084f4eff..df4bbdca8d6 100644 --- a/multichain-testing/test/send-anywhere.test.ts +++ b/multichain-testing/test/send-anywhere.test.ts @@ -23,7 +23,7 @@ test.before(async t => { const { setupTestKeys, ...common } = await commonSetup(t); const { commonBuilderOpts, deleteTestKeys, faucetTools, startContract } = common; - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...common, wallets }; await startContract(contractName, contractBuilder, commonBuilderOpts); diff --git a/multichain-testing/test/stake-ica.test.ts b/multichain-testing/test/stake-ica.test.ts index af73531bf61..7ef65ad33eb 100644 --- a/multichain-testing/test/stake-ica.test.ts +++ b/multichain-testing/test/stake-ica.test.ts @@ -18,7 +18,7 @@ test.before(async t => { const { deleteTestKeys, setupTestKeys, ...rest } = await commonSetup(t); // XXX not necessary for CI, but helpful for unexpected failures in // active development (test.after cleanup doesn't run). - deleteTestKeys(accounts).catch(); + await deleteTestKeys(accounts).catch(); const wallets = await setupTestKeys(accounts); t.context = { ...rest, wallets, deleteTestKeys }; });