Skip to content

Commit

Permalink
fix: fix tests + bump vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jul 18, 2024
1 parent 3087baa commit 54b3b00
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 356 deletions.
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"release:beta": "standard-version -a --prerelease beta --skip.changelog",
"test": "vitest --run --dangerouslyIgnoreUnhandledErrors",
"test:cov": "yarn test --coverage",
"test:e2e": "yarn test -c vitest.e2e.config.ts",
"test:unit": "yarn test .unit.spec.ts",
"check:types": "tsc --noEmit",
"check:circular-deps": "madge --circular $(find ./src -name '*.ts')",
Expand All @@ -96,9 +95,9 @@
"dependencies": {
"@lifi/types": "^13.18.2",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/web3.js": "^1.95.0",
"@solana/web3.js": "^1.95.1",
"eth-rpc-errors": "^4.0.3",
"viem": "^2.17.4"
"viem": "^2.17.5"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
Expand All @@ -107,14 +106,14 @@
"@types/ws": "^8.5.11",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.3",
"bs58": "^6.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^48.7.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-prettier": "^5.2.1",
"fs-extra": "^11.2.0",
"husky": "^9.0.11",
"husky": "^9.1.1",
"lint-staged": "^15.2.7",
"madge": "^7.0.0",
"msw": "^2.3.1",
Expand All @@ -123,7 +122,7 @@
"standard-version": "^9.5.0",
"ts-node": "^10.9.2",
"typescript": "^5.5.3",
"vitest": "^1.6.0"
"vitest": "^2.0.3"
},
"peerDependencies": {
"@solana/wallet-adapter-base": "^0.9.0",
Expand Down
6 changes: 3 additions & 3 deletions src/core/EVM/getAllowance.int.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ describe('allowance integration tests', () => {
)

it(
'should handle token lists with more than 100 tokens',
'should handle token lists with more than 10 tokens',
async () => {
const { tokens } = await getTokens({
chains: [ChainId.POL],
})
const filteredTokens = tokens[ChainId.POL]
filteredTokens.unshift(memeToken)

expect(filteredTokens?.length).toBeGreaterThan(100)
expect(filteredTokens?.length).toBeGreaterThanOrEqual(10)
const tokenSpenders: TokenSpender[] | undefined = filteredTokens?.map(
(token) => ({
token,
Expand All @@ -110,7 +110,7 @@ describe('allowance integration tests', () => {
if (tokenSpenders?.length) {
const tokens = await getTokenAllowanceMulticall(
defaultWalletAddress,
tokenSpenders.slice(0, 150)
tokenSpenders.slice(0, 10)
)

for (let i = 0; i < tokens.length; i++) {
Expand Down
3 changes: 1 addition & 2 deletions src/core/Solana/getSolanaBalance.int.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ describe.sequential('Solana token balance', async () => {
const tokens = [
findDefaultToken(CoinKey.USDC, ChainId.SOL),
findDefaultToken(CoinKey.USDT, ChainId.SOL),
findDefaultToken(CoinKey.SOL, ChainId.SOL),
]

await loadAndCompareTokenAmounts(walletAddress, tokens)
Expand All @@ -67,7 +66,7 @@ describe.sequential('Solana token balance', async () => {
)

it(
'should return even with invalid data on POL',
'should return even with invalid data',
async () => {
const walletAddress = defaultWalletAddress
const invalidToken = findDefaultToken(CoinKey.MATIC, ChainId.SOL)
Expand Down
10 changes: 0 additions & 10 deletions vitest.e2e.config.ts

This file was deleted.

Loading

0 comments on commit 54b3b00

Please sign in to comment.