Skip to content

Commit ae839b8

Browse files
authored
Merge pull request #5 from aave/fix/tests
fix: outdated tests
2 parents 61078c8 + 009952c commit ae839b8

File tree

3 files changed

+31
-12
lines changed

3 files changed

+31
-12
lines changed

packages/client/src/actions/__snapshots__/chains.test.ts.snap

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,96 +5,112 @@ exports[`Given the Aave client > When using the 'chains(client)' action > Then i
55
{
66
"__typename": "Chain",
77
"chainId": 1,
8+
"explorerUrl": "https://etherscan.io",
89
"icon": "https://statics.aave.com/ethereum.svg",
910
"name": "Ethereum",
1011
},
1112
{
1213
"__typename": "Chain",
1314
"chainId": 42161,
15+
"explorerUrl": "https://arbiscan.io",
1416
"icon": "https://statics.aave.com/arbitrum.svg",
1517
"name": "Arbitrum",
1618
},
1719
{
1820
"__typename": "Chain",
1921
"chainId": 43114,
22+
"explorerUrl": "https://cchain.explorer.avax.network",
2023
"icon": "https://statics.aave.com/avalanche.svg",
2124
"name": "Avalanche",
2225
},
2326
{
2427
"__typename": "Chain",
2528
"chainId": 8453,
29+
"explorerUrl": "https://basescan.org",
2630
"icon": "https://statics.aave.com/base.svg",
2731
"name": "Base",
2832
},
2933
{
3034
"__typename": "Chain",
3135
"chainId": 56,
36+
"explorerUrl": "https://bscscan.com",
3237
"icon": "https://statics.aave.com/bnbchain.svg",
3338
"name": "BSC",
3439
},
3540
{
3641
"__typename": "Chain",
3742
"chainId": 42220,
43+
"explorerUrl": "https://celoscan.io",
3844
"icon": "https://statics.aave.com/celo.svg",
3945
"name": "Celo",
4046
},
4147
{
4248
"__typename": "Chain",
4349
"chainId": 100,
50+
"explorerUrl": "https://gnosisscan.io",
4451
"icon": "https://statics.aave.com/Gnosis.svg",
4552
"name": "Gnosis",
4653
},
4754
{
4855
"__typename": "Chain",
4956
"chainId": 59144,
57+
"explorerUrl": "https://lineascan.build",
5058
"icon": "https://statics.aave.com/linea.svg",
5159
"name": "Linea",
5260
},
5361
{
5462
"__typename": "Chain",
5563
"chainId": 1088,
64+
"explorerUrl": "https://andromeda-explorer.metis.io",
5665
"icon": "https://statics.aave.com/Metis.svg",
5766
"name": "Metis",
5867
},
5968
{
6069
"__typename": "Chain",
6170
"chainId": 10,
71+
"explorerUrl": "https://optimistic.etherscan.io",
6272
"icon": "https://statics.aave.com/optimism.svg",
6373
"name": "Optimism",
6474
},
6575
{
6676
"__typename": "Chain",
6777
"chainId": 137,
78+
"explorerUrl": "https://polygonscan.com",
6879
"icon": "https://statics.aave.com/polygon.svg",
6980
"name": "Polygon",
7081
},
7182
{
7283
"__typename": "Chain",
7384
"chainId": 534352,
85+
"explorerUrl": "https://scrollscan.com",
7486
"icon": "https://statics.aave.com/scroll-network.svg",
7587
"name": "Scroll",
7688
},
7789
{
7890
"__typename": "Chain",
7991
"chainId": 1868,
92+
"explorerUrl": "https://soneium.blockscout.com",
8093
"icon": "https://statics.aave.com/soneium.svg",
8194
"name": "Soneium",
8295
},
8396
{
8497
"__typename": "Chain",
8598
"chainId": 146,
99+
"explorerUrl": "https://sonicscan.org",
86100
"icon": "https://statics.aave.com/sonic.svg",
87101
"name": "Sonic",
88102
},
89103
{
90104
"__typename": "Chain",
91105
"chainId": 324,
106+
"explorerUrl": "https://era.zksync.network",
92107
"icon": "https://statics.aave.com/zksync-era-light.svg",
93108
"name": "zkSync",
94109
},
95110
{
96111
"__typename": "Chain",
97112
"chainId": 5000,
113+
"explorerUrl": "https://explorer.mantle.xyz",
98114
"icon": "https://statics.aave.com/mantle.svg",
99115
"name": "Mantle",
100116
},

packages/client/src/actions/__snapshots__/markets.test.ts.snap

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ exports[`Given the Aave Protocol v3 > When fetching markets data > Then it shoul
77
"borrowReserves": Any<Array>,
88
"chain": {
99
"__typename": "Chain",
10-
"chainId": 99999999,
10+
"chainId": 1,
11+
"explorerUrl": "https://etherscan.io",
1112
"icon": "https://statics.aave.com/ethereum.svg",
12-
"name": "Forked Ethereum",
13+
"name": "Ethereum",
1314
},
1415
"eModeCategories": Any<Array>,
1516
"icon": "https://statics.aave.com/ethereum.svg",
16-
"name": "AaveV3EthereumForkedEtherFi",
17+
"name": "AaveV3EthereumEtherFi",
1718
"supplyReserves": Any<Array>,
1819
"totalAvailableLiquidity": Any<String>,
1920
"totalMarketSize": Any<String>,
@@ -28,13 +29,14 @@ exports[`Given the Aave Protocol v3 > When fetching markets data > Then it shoul
2829
"borrowReserves": Any<Array>,
2930
"chain": {
3031
"__typename": "Chain",
31-
"chainId": 99999999,
32+
"chainId": 1,
33+
"explorerUrl": "https://etherscan.io",
3234
"icon": "https://statics.aave.com/ethereum.svg",
33-
"name": "Forked Ethereum",
35+
"name": "Ethereum",
3436
},
3537
"eModeCategories": Any<Array>,
3638
"icon": "https://statics.aave.com/ethereum.svg",
37-
"name": "AaveV3EthereumForkedLido",
39+
"name": "AaveV3EthereumLido",
3840
"supplyReserves": Any<Array>,
3941
"totalAvailableLiquidity": Any<String>,
4042
"totalMarketSize": Any<String>,
@@ -49,13 +51,14 @@ exports[`Given the Aave Protocol v3 > When fetching markets data > Then it shoul
4951
"borrowReserves": Any<Array>,
5052
"chain": {
5153
"__typename": "Chain",
52-
"chainId": 99999999,
54+
"chainId": 1,
55+
"explorerUrl": "https://etherscan.io",
5356
"icon": "https://statics.aave.com/ethereum.svg",
54-
"name": "Forked Ethereum",
57+
"name": "Ethereum",
5558
},
5659
"eModeCategories": Any<Array>,
5760
"icon": "https://statics.aave.com/ethereum.svg",
58-
"name": "AaveV3ForkedEthereum",
61+
"name": "AaveV3Ethereum",
5962
"supplyReserves": Any<Array>,
6063
"totalAvailableLiquidity": Any<String>,
6164
"totalMarketSize": Any<String>,

packages/client/src/actions/markets.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { assertOk } from '@aave/types';
1+
import { assertOk, chainId } from '@aave/types';
22
import { describe, expect, it } from 'vitest';
3-
import { client, ETHEREUM_FORK_ID } from '../test-utils';
3+
import { client } from '../test-utils';
44
import { markets } from './markets';
55

66
describe('Given the Aave Protocol v3', () => {
77
describe('When fetching markets data', () => {
88
it('Then it should be possible to fetch markets for a given chain ID', async () => {
99
const result = await markets(client, {
10-
chainIds: [ETHEREUM_FORK_ID],
10+
chainIds: [chainId(1)],
1111
});
1212

1313
assertOk(result);

0 commit comments

Comments
 (0)