Skip to content

Commit db444d4

Browse files
0xnigir10xkenj1
authored andcommitted
test: strategy integration tests (#68)
# 🤖 Linear Closes GIT-265 GIT-262 ## Description Write integration tests for Strategy events on Orchestrator level (continuation of #67). Also, fix some issues on Registration handler regarding Date and BlockTimestamp conversion <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Expanded strategy mapping to support additional entries. - **Refactor** - Enhanced event handling by making a key parameter optional with a default value. - Refined timestamp processing to ensure consistent and accurate date representations. - **Tests** - Introduced new integration tests to validate and monitor strategy event processing and time accuracy. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 0e41245 commit db444d4

File tree

9 files changed

+613
-8
lines changed

9 files changed

+613
-8
lines changed

packages/data-flow/test/integration/helpers/dependencies.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ export const DEFAULT_STRATEGY_MAP = new Map<ChainId, Map<Address, Hex>>([
113113
"0xF5F6Ca46a9DA3C1089d0F2F029cF14F3F714D483",
114114
"0x103732a8e473467a510d4128ee11065262bdd978f0d9dad89ba68f2c56127e27",
115115
],
116+
[
117+
"0xD5F6cA46A9DA3c1089D0F2F029CF14F3f714D483",
118+
"0x6f9291df02b2664139cec5703c124e4ebce32879c74b6297faa1468aa5ff9ebf",
119+
],
116120
]),
117121
],
118122
]);

packages/data-flow/test/integration/helpers/eventFactory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const createTestRegistryEvent = <E extends RegistryEvent>({
9696
export const createTestStrategyEvent = <E extends StrategyEvent>({
9797
eventName,
9898
params,
99-
blockNumber,
99+
blockNumber = DEFAULT_BLOCK_NUMBER,
100100
blockTimestamp = DEFAULT_TIMESTAMP_MS,
101101
logIndex = 0,
102102
chainId = 1,
@@ -106,7 +106,7 @@ export const createTestStrategyEvent = <E extends StrategyEvent>({
106106
}: {
107107
eventName: E;
108108
params: EventParams<"Strategy", E>;
109-
blockNumber: number;
109+
blockNumber?: number;
110110
blockTimestamp?: TimestampMs;
111111
logIndex?: number;
112112
chainId?: number;

0 commit comments

Comments
 (0)