Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 10ea55c

Browse files
committed
ci: run integration test on ci
1 parent 144fade commit 10ea55c

3 files changed

Lines changed: 51 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"license": "MIT",
1313
"scripts": {
1414
"build": "tsc -p .",
15-
"test": "yarn test:unit && jest -i strategy.test.ts",
15+
"test": "jest -i test/unit/ -i test/integration/ -i strategy.test.ts",
1616
"test:vp": "jest -i vp.test.ts",
1717
"test:delegation": "jest -i delegation.test.ts",
1818
"test:validation": "jest -i validation.test.ts",

test/integration/utils/__snapshots__/vp.test.ts.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ exports[`VP Calculation Integration Tests getVp() should calculate VP for EVM ad
1111
}
1212
`;
1313

14+
exports[`VP Calculation Integration Tests getVp() should calculate VP for EVM address on mixed protocol with delegation enabled 1`] = `
15+
{
16+
"vp": 10.028706352441185,
17+
"vp_by_strategy": [
18+
0,
19+
10.028706352441185,
20+
],
21+
"vp_state": "final",
22+
}
23+
`;
24+
1425
exports[`VP Calculation Integration Tests getVp() should calculate VP for Starknet address on evm protocol 1`] = `
1526
{
1627
"vp": 0,

test/integration/utils/vp.test.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ describe('VP Calculation Integration Tests', () => {
4242
expect(scores).toMatchSnapshot();
4343
}, 20e3);
4444

45+
it('should calculate VP for EVM address on mixed protocol with delegation enabled', async () => {
46+
const scores = await getVp(
47+
vpTestFixtures.evmWithMixedProtocols.address,
48+
vpTestFixtures.evmWithMixedProtocols.network,
49+
vpTestFixtures.evmWithMixedProtocols.strategies,
50+
vpTestFixtures.evmWithMixedProtocols.snapshot,
51+
vpTestFixtures.evmWithMixedProtocols.space,
52+
true
53+
);
54+
55+
expect(scores).toMatchSnapshot();
56+
}, 20e3);
57+
4558
it('should calculate VP for Starknet address on mixed protocol', async () => {
4659
const scores = await getVp(
4760
vpTestFixtures.starknetWithMixedProtocols.address,
@@ -55,6 +68,19 @@ describe('VP Calculation Integration Tests', () => {
5568
expect(scores).toMatchSnapshot();
5669
}, 20e3);
5770

71+
it('should calculate VP for Starknet address on mixed protocol with delegation enabled', async () => {
72+
const scores = await getVp(
73+
vpTestFixtures.starknetWithMixedProtocols.address,
74+
vpTestFixtures.starknetWithMixedProtocols.network,
75+
vpTestFixtures.starknetWithMixedProtocols.strategies,
76+
vpTestFixtures.starknetWithMixedProtocols.snapshot,
77+
vpTestFixtures.starknetWithMixedProtocols.space,
78+
true
79+
);
80+
81+
expect(scores).toMatchSnapshot();
82+
}, 20e3);
83+
5884
it('should calculate VP for Starknet address on evm protocol', async () => {
5985
const scores = await getVp(
6086
vpTestFixtures.starknetWithEvmProtocol.address,
@@ -68,6 +94,19 @@ describe('VP Calculation Integration Tests', () => {
6894
expect(scores).toMatchSnapshot();
6995
}, 20e3);
7096

97+
it('should calculate VP for Starknet address on evm protocol with delegation enabled', async () => {
98+
const scores = await getVp(
99+
vpTestFixtures.starknetWithEvmProtocol.address,
100+
vpTestFixtures.starknetWithEvmProtocol.network,
101+
vpTestFixtures.starknetWithEvmProtocol.strategies,
102+
vpTestFixtures.starknetWithEvmProtocol.snapshot,
103+
vpTestFixtures.starknetWithEvmProtocol.space,
104+
true
105+
);
106+
107+
expect(scores).toMatchSnapshot();
108+
}, 20e3);
109+
71110
it('should throw an error with invalid address', async () => {
72111
await expect(
73112
getVp(

0 commit comments

Comments
 (0)