Missing tests for vaults Redeem/SetFee/WithdrawFees #107
pull-request.yml
on: pull_request
Verify
/
Lint
29s
Verify
/
Test
5m 22s
Annotations
10 errors
|
packages/client/src/actions/reserve.test.ts > Given an Aave Market reserve > When fetching the supply APY history for it > Then it should return a time series for the specified window LAST_DAY:
packages/client/src/actions/reserve.test.ts#L94
AssertionError: expected [ …(289) ] to deeply equal [ ObjectContaining{…}, …(288) ]
- Expected
+ Received
[
- ObjectContaining {
- "avgRate": Any<Object>,
- "date": toBeBetween<2025-07-23T19:06:24.270Z, 2025-07-24T19:06:24.270Z>,
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.28",
+ "raw": "32818729063362962305532466",
+ "value": "0.032818729063362962305532466",
+ },
+ "date": "2025-07-24T19:05:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.28",
+ "raw": "32818729063362962305532466",
+ "value": "0.032818729063362962305532466",
+ },
+ "date": "2025-07-24T19:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.65",
+ "raw": "36476537546852521811405020",
+ "value": "0.03647653754685252181140502",
+ },
+ "date": "2025-07-24T18:55:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.05",
+ "raw": "20450095793085161117114861",
+ "value": "0.020450095793085161117114861",
+ },
+ "date": "2025-07-24T18:50:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.34",
+ "raw": "33449814708220964207059657",
+ "value": "0.033449814708220964207059657",
+ },
+ "date": "2025-07-24T18:45:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.13",
+ "raw": "21303795591972080632146534",
+ "value": "0.021303795591972080632146534",
+ },
+ "date": "2025-07-24T18:40:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "4.33",
+ "raw": "43266941017795279211850050",
+ "value": "0.04326694101779527921185005",
+ },
+ "date": "2025-07-24T18:35:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.20",
+ "raw": "22011102464089748021504977",
+ "value": "0.022011102464089748021504977",
+ },
+ "date": "2025-07-24T18:30:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.21",
+ "raw": "32058981865610764031361338",
+ "value": "0.032058981865610764031361338",
+ },
+ "date": "2025-07-24T18:25:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.97",
+ "raw": "29747456563603821576347837",
+ "value": "0.029747456563603821576347837",
+ },
+ "date": "2025-07-24T18:20:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.11",
+ "raw": "31090486381786733650955165",
+ "value": "0.031090486381786733650955165",
+ },
+ "date": "2025-07-24T18:15:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "4.08",
+ "raw": "40760599623844804372162645",
+ "value": "0.040760599623844804372162645",
+ },
+ "date": "2025-07-24T18:10:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.87",
+ "raw": "28733412317918515201032299",
+ "value": "0.0287
|
|
packages/client/src/actions/reserve.test.ts > Given an Aave Market reserve > When fetching the borrow APY history for it > Then it should return a time series for the specified window LAST_YEAR:
packages/client/src/actions/reserve.test.ts#L69
AssertionError: expected 0 to be greater than 0
❯ packages/client/src/actions/reserve.test.ts:69:38
|
|
packages/client/src/actions/reserve.test.ts > Given an Aave Market reserve > When fetching the borrow APY history for it > Then it should return a time series for the specified window LAST_SIX_MONTHS:
packages/client/src/actions/reserve.test.ts#L69
AssertionError: expected 0 to be greater than 0
❯ packages/client/src/actions/reserve.test.ts:69:38
|
|
packages/client/src/actions/reserve.test.ts > Given an Aave Market reserve > When fetching the borrow APY history for it > Then it should return a time series for the specified window LAST_MONTH:
packages/client/src/actions/reserve.test.ts#L69
AssertionError: expected 0 to be greater than 0
❯ packages/client/src/actions/reserve.test.ts:69:38
|
|
packages/client/src/actions/reserve.test.ts > Given an Aave Market reserve > When fetching the borrow APY history for it > Then it should return a time series for the specified window LAST_WEEK:
packages/client/src/actions/reserve.test.ts#L70
AssertionError: expected [ …(169) ] to deeply equal [ ObjectContaining{…}, …(168) ]
- Expected
+ Received
[
- ObjectContaining {
- "avgRate": Any<Object>,
- "date": toBeBetween<2025-07-17T19:06:23.965Z, 2025-07-24T19:06:23.965Z>,
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.81",
+ "raw": "28123126667945865340074064",
+ "value": "0.028123126667945865340074064",
+ },
+ "date": "2025-07-24T19:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.81",
+ "raw": "28123126667945865340074064",
+ "value": "0.028123126667945865340074064",
+ },
+ "date": "2025-07-24T18:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.94",
+ "raw": "39382831546243786111071699",
+ "value": "0.039382831546243786111071699",
+ },
+ "date": "2025-07-24T17:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T16:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T15:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T14:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T13:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T12:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T11:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T10:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T09:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.024598298727805717953511903",
+ },
+ "date": "2025-07-24T08:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.46",
+ "raw": "24598298727805717953511903",
+ "value": "0.02
|
|
packages/client/src/actions/reserve.test.ts > Given an Aave Market reserve > When fetching the borrow APY history for it > Then it should return a time series for the specified window LAST_DAY:
packages/client/src/actions/reserve.test.ts#L70
AssertionError: expected [ …(289) ] to deeply equal [ ObjectContaining{…}, …(288) ]
- Expected
+ Received
[
- ObjectContaining {
- "avgRate": Any<Object>,
- "date": toBeBetween<2025-07-23T19:06:23.703Z, 2025-07-24T19:06:23.703Z>,
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.28",
+ "raw": "32818729063362962305532466",
+ "value": "0.032818729063362962305532466",
+ },
+ "date": "2025-07-24T19:05:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.28",
+ "raw": "32818729063362962305532466",
+ "value": "0.032818729063362962305532466",
+ },
+ "date": "2025-07-24T19:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.65",
+ "raw": "36476537546852521811405020",
+ "value": "0.03647653754685252181140502",
+ },
+ "date": "2025-07-24T18:55:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.05",
+ "raw": "20450095793085161117114861",
+ "value": "0.020450095793085161117114861",
+ },
+ "date": "2025-07-24T18:50:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.34",
+ "raw": "33449814708220964207059657",
+ "value": "0.033449814708220964207059657",
+ },
+ "date": "2025-07-24T18:45:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.13",
+ "raw": "21303795591972080632146534",
+ "value": "0.021303795591972080632146534",
+ },
+ "date": "2025-07-24T18:40:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "4.33",
+ "raw": "43266941017795279211850050",
+ "value": "0.04326694101779527921185005",
+ },
+ "date": "2025-07-24T18:35:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.20",
+ "raw": "22011102464089748021504977",
+ "value": "0.022011102464089748021504977",
+ },
+ "date": "2025-07-24T18:30:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.21",
+ "raw": "32058981865610764031361338",
+ "value": "0.032058981865610764031361338",
+ },
+ "date": "2025-07-24T18:25:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.97",
+ "raw": "29747456563603821576347837",
+ "value": "0.029747456563603821576347837",
+ },
+ "date": "2025-07-24T18:20:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.11",
+ "raw": "31090486381786733650955165",
+ "value": "0.031090486381786733650955165",
+ },
+ "date": "2025-07-24T18:15:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "4.08",
+ "raw": "40760599623844804372162645",
+ "value": "0.040760599623844804372162645",
+ },
+ "date": "2025-07-24T18:10:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "2.87",
+ "raw": "28733412317918515201032299",
+ "value": "0.0287
|
|
packages/client/src/actions/markets.test.ts > Given the Aave Protocol v3 > When fetching user market state for a new user > Then it should return the expected data for a user that has never interacted with the market:
packages/client/src/actions/markets.test.ts#L99
Error: Snapshot mismatched
- Expected
+ Received
{
+ "__typename": "MarketUserState",
"availableBorrowsBase": Any<String>,
- "currentLiquidationThreshold": Any<String>,
+ "currentLiquidationThreshold": {
+ "__typename": "PercentValue",
+ "decimals": 0,
+ "formatted": "0",
+ "raw": "0",
+ "value": "0",
+ },
+ "eModeEnabled": false,
"healthFactor": Any<String>,
- "ltv": Any<String>,
- "netAPY": Any<String>,
+ "isInIsolationMode": false,
+ "ltv": {
+ "__typename": "PercentValue",
+ "decimals": 0,
+ "formatted": "0",
+ "raw": "0",
+ "value": "0",
+ },
+ "netAPY": {
+ "__typename": "PercentValue",
+ "decimals": 0,
+ "formatted": "0",
+ "raw": "0",
+ "value": "0",
+ },
"netWorth": Any<String>,
"totalCollateralBase": Any<String>,
"totalDebtBase": Any<String>,
}
❯ packages/client/src/actions/markets.test.ts:99:28
|
|
packages/client/src/actions/markets.test.ts > Given the Aave Protocol v3 > When fetching a single market > Then it should return supply reserves APYs in the expected order of magnitude:
packages/client/src/actions/markets.test.ts#L69
AssertionError: expected [ { token: 'WETH', …(1) }, …(48) ] to deeply equal [ { token: 'WETH', …(1) }, …(48) ]
- Expected
+ Received
@@ -1,16 +1,16 @@
[
{
- "apy": toBeBigDecimalCloseTo<"4", 0>,
+ "apy": "0.436724129294769931570786867",
"token": "WETH",
},
{
- "apy": toBeBigDecimalCloseTo<"3", 0>,
+ "apy": "0.038201764573529560648125114",
"token": "USDC",
},
{
- "apy": toBeBigDecimalCloseTo<"3", 0>,
+ "apy": "0.037998810047443793528461769",
"token": "USDS",
},
Any<Object>,
Any<Object>,
Any<Object>,
❯ packages/client/src/actions/markets.test.ts:69:9
|
|
packages/client/src/actions/markets.test.ts > Given the Aave Protocol v3 > When fetching markets by chain ID(s) > Then it should return the expected data for each market:
packages/client/src/actions/markets.test.ts#L24
Error: Snapshot `Given the Aave Protocol v3 > When fetching markets by chain ID(s) > Then it should return the expected data for each market 1` mismatched
- Expected
+ Received
{
"__typename": "Market",
- "address": "0x0AA97c284e98396202b6A04024F5E2c65026F3c0",
+ "address": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
"borrowReserves": Any<Array>,
"chain": {
"__typename": "Chain",
"chainId": 1,
"explorerUrl": "https://etherscan.io",
"icon": "https://statics.aave.com/ethereum.svg",
"name": "Ethereum",
},
"eModeCategories": Any<Array>,
"icon": "https://statics.aave.com/ethereum.svg",
- "name": "AaveV3EthereumEtherFi",
+ "name": "AaveV3Ethereum",
"supplyReserves": Any<Array>,
"totalAvailableLiquidity": Any<String>,
"totalMarketSize": Any<String>,
"userState": null,
}
❯ packages/client/src/actions/markets.test.ts:24:24
❯ packages/client/src/actions/markets.test.ts:23:20
|
|
packages/client/src/actions/borrow.test.ts > Given an Aave Market > And a user with a supply position > When the user set the supply as collateral > Then it should be possible to borrow native from the reserve:
packages/client/src/actions/borrow.test.ts#L189
AssertionError: expected +0 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 0
❯ packages/client/src/actions/borrow.test.ts:189:43
|