chore: updates vault tests scenarios #97
pull-request.yml
on: pull_request
Verify
/
Lint
24s
Verify
/
Test
4m 12s
Annotations
10 errors
|
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#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_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-23T12:23:40.450Z, 2025-07-24T12:23:40.450Z>,
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.12",
+ "raw": "31178923101097100383660260",
+ "value": "0.03117892310109710038366026",
+ },
+ "date": "2025-07-24T12:20:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.12",
+ "raw": "31178923101097100383660260",
+ "value": "0.03117892310109710038366026",
+ },
+ "date": "2025-07-24T12:15:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T12:10:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T12:05:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T12:00:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T11:55:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T11:50:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T11:45:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T11:40:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T11:35:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T11:30:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.017293762721686262887298073",
+ },
+ "date": "2025-07-24T11:25:00+00:00",
+ },
+ {
+ "__typename": "APYSample",
+ "avgRate": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "1.73",
+ "raw": "17293762721686262887298073",
+ "value": "0.0172
|
|
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.437191108641593134423968499",
"token": "WETH",
},
{
- "apy": toBeBigDecimalCloseTo<"3", 0>,
+ "apy": "0.03820127064198107748640942",
"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/eMode.test.ts > Given an Aave Market > And the user has some supply positions > When the user enables an E-Mode category involving some of the supply positions > Then any user supply position that are not included in the E-Mode category should not be able to be used as collateral:
packages/client/src/actions/eMode.test.ts#L172
AssertionError: expected [ { …(7) }, { …(7) } ] to match object [ ObjectContaining{…}, …(1) ]
(28 matching properties omitted from actual)
- Expected
+ Received
@@ -1,10 +1,49 @@
[
- ObjectContaining {
- "canBeCollateral": false,
- "currency": ObjectContaining {
+ {
+ "__typename": "MarketUserReserveSupplyPosition",
+ "apy": {
+ "__typename": "PercentValue",
+ "decimals": 27,
+ "formatted": "3.82",
+ "raw": "38201270641981077486409420",
+ "value": "0.03820127064198107748640942",
+ },
+ "balance": {
+ "__typename": "TokenAmount",
+ "amount": {
+ "__typename": "DecimalValue",
+ "decimals": 6,
+ "raw": "10000",
+ "value": "0.01",
+ },
+ "usd": "0.0099986",
+ "usdPerToken": "0.99986",
+ },
+ "canBeCollateral": true,
+ "currency": {
+ "__typename": "Currency",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
+ "chainId": 99999999,
+ "decimals": 6,
+ "imageUrl": "https://token-logos.family.co/asset?id=99999999:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&token=USDC",
+ "name": "USD Coin",
+ "symbol": "USDC",
+ },
+ "isCollateral": true,
+ "market": {
+ "__typename": "MarketInfo",
+ "address": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
+ "chain": {
+ "__typename": "Chain",
+ "chainId": 99999999,
+ "explorerUrl": "https://dashboard.tenderly.co/explorer/vnet/27ff3c60-0e2c-4d46-8190-f5170dc7da8c",
+ "icon": "https://statics.aave.com/ethereum.svg",
+ "name": "Forked Ethereum",
+ },
+ "icon": "https://statics.aave.com/ethereum.svg",
+ "name": "AaveV3ForkedEthereum",
},
},
ObjectContaining {
"canBeCollateral": true,
"currency": ObjectContaining {
❯ packages/client/src/actions/eMode.test.ts:172:30
|
|
packages/client/src/actions/eMode.test.ts > Given an Aave Market > When a user enables an E-Mode category for the given market > Then the market's reserves should have user state that reflects the selected E-Mode category settings:
packages/client/src/actions/eMode.test.ts#L70
AssertionError: expected { __typename: 'Reserve', …(16) } to match object { userState: ObjectContaining{…} }
(98 matching properties omitted from actual)
- Expected
+ Received
{
- "userState": ObjectContaining {
+ "userState": {
+ "__typename": "ReserveUserState",
+ "balance": {
+ "__typename": "TokenAmount",
+ "amount": {
+ "__typename": "DecimalValue",
+ "decimals": 18,
+ "raw": "0",
+ "value": "0",
+ },
+ "usd": "0",
+ "usdPerToken": "0.3024919",
+ },
+ "borrowable": {
+ "__typename": "TokenAmount",
+ "amount": {
+ "__typename": "DecimalValue",
+ "decimals": 18,
+ "raw": "0",
+ "value": "0",
+ },
+ "usd": "0",
+ "usdPerToken": "0.3024919",
+ },
"canBeBorrowed": false,
- "canBeCollateral": false,
- "emode": ObjectContaining {
- "categoryId": 1,
+ "canBeCollateral": true,
+ "emode": null,
+ "isInIsolationMode": true,
+ "suppliable": {
+ "__typename": "TokenAmount",
+ "amount": {
+ "__typename": "DecimalValue",
+ "decimals": 18,
+ "raw": "0",
+ "value": "0",
+ },
+ "usd": "0",
+ "usdPerToken": "0.3024919",
},
},
}
❯ packages/client/src/actions/eMode.test.ts:70:25
|
|
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
|