Skip to content

Commit 0f7c83e

Browse files
committed
fix: Missing lints
1 parent 314811a commit 0f7c83e

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

typescript/cli/src/tests/commands/helpers.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
WarpCoreConfig,
2121
WarpCoreConfigSchema,
2222
} from '@hyperlane-xyz/sdk';
23-
import { Address, assert, sleep } from '@hyperlane-xyz/utils';
23+
import { Address, sleep } from '@hyperlane-xyz/utils';
2424

2525
import { getContext } from '../../context/context.js';
2626
import { CommandContext } from '../../context/types.js';
@@ -531,7 +531,10 @@ export async function restoreSnapshot(
531531
const result = await snapshotBaseCall<boolean>(rpcUrl, 'evm_revert', [
532532
snapshotId,
533533
]);
534-
assert(result, 'Failed to restore snapshot');
534+
535+
if (!result) {
536+
throw new Error('Failed to restore snapshot');
537+
}
535538
}
536539

537540
async function snapshotBaseCall<T>(

typescript/cli/src/tests/warp/warp-rebalancer.e2e-test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,15 @@ describe('hyperlane warp rebalancer e2e tests', async function () {
181181
// eslint-disable-next-line no-async-promise-executor
182182
return new Promise(async (resolve, reject) => {
183183
const timeoutId = setTimeout(async () => {
184-
await process.kill();
185184
reject(new Error(`Timeout waiting for log: "${log}"`));
185+
void process.kill();
186186
}, timeout);
187187

188188
process.catch((e) => {
189189
clearTimeout(timeoutId);
190-
// TODO: Do a pretty print of the error
191-
reject(e.text());
190+
reject(
191+
new Error(`Process failed before logging: "${log}" with error: ${e}`),
192+
);
192193
});
193194

194195
for await (let chunk of process.stdout) {
@@ -197,7 +198,7 @@ describe('hyperlane warp rebalancer e2e tests', async function () {
197198
if (chunk.includes(log)) {
198199
clearTimeout(timeoutId);
199200
resolve();
200-
await process.kill();
201+
void process.kill();
201202
break;
202203
}
203204
}

0 commit comments

Comments
 (0)