Skip to content

Commit 1031e62

Browse files
authored
fix: e2e tests when run together (#2149)
1 parent c487a2c commit 1031e62

File tree

3 files changed

+693
-623
lines changed

3 files changed

+693
-623
lines changed

e2e-api/swap/execute-approval.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ describe("execute response of GET /swap/approval", () => {
133133
] as Address;
134134
const originClient = e2eConfig.getClient(originChainId);
135135
const destinationClient = e2eConfig.getClient(destinationChainId);
136-
await originClient.tevmReady();
137-
await destinationClient.tevmReady();
136+
await Promise.all([
137+
originClient.tevmReady(),
138+
destinationClient.tevmReady(),
139+
]);
138140

139141
// Set funds for depositor
140142
await originClient.tevmDeal({
@@ -326,13 +328,16 @@ describe("execute response of GET /swap/approval", () => {
326328
"exactInput",
327329
B2A_BASE_TEST_CASE
328330
);
331+
const blockNumber = await originClient.getBlockNumber();
329332

330333
// Mine next block to make the deposit expired (2 minutes from now)
331334
await originClient.tevmMine({ blockCount: 2, interval: 2 * 60 });
332335

333336
await expect(executeApprovalAndDeposit(swapQuote)).rejects.toThrow(
334337
/revert/
335338
);
339+
340+
await originClient.reset({ blockNumber });
336341
},
337342
JEST_TIMEOUT_MS
338343
);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"prettier": "^3.4.2",
187187
"rollup-plugin-visualizer": "^5.12.0",
188188
"storybook": "^7.5.3",
189-
"tevm": "^1.0.0-next.147",
189+
"tevm": "^1.0.0-next.149",
190190
"ts-node": "^10.9.2",
191191
"tsx": "^4.15.6",
192192
"typescript-eslint": "^7.13.1",

0 commit comments

Comments
 (0)