enzymefinance / protocol

Enzyme Protocol Implementation
https://enzyme.finance
GNU General Public License v3.0
375 stars 156 forks source link

Test cases are failing #1049

Closed eakarsu closed 2 years ago

eakarsu commented 2 years ago

I had old version of code from August, whose test cases was working fine. I pulled the latest code as of today and run yarn install yarn compile cat .env

MAINNET

ETHEREUM_NODE_MAINNET=https://eth-mainnet.alchemyapi.io/v2/4gZBZgXw-GGmzJF3R6FTJvXKNK_XDTJn yarn test

Most of test cases are failing with same error output. Can you look at this?

● validateRule › does not allow an unlisted asset

ERROR processing skip func of /home/eakarsu/Research/enzyme/protocol/deploy/scripts/config/Mainnet.ts:
TypeError: Unable to require file: packages/protocol/src/index.ts
This is usually the result of a faulty configuration or import. Make sure there is a `.js`, `.json` or other executable extension with loader attached before `ts-node` available.

  at getOutput (node_modules/ts-node/src/index.ts:891:17)
  at Object.compile (node_modules/ts-node/src/index.ts:1185:30)
  at Module.m._compile (node_modules/ts-node/src/index.ts:1309:30)
  at require.extensions.<computed> (node_modules/ts-node/src/index.ts:1313:12)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at Object.newLoader [as .ts] (node_modules/pirates/lib/index.js:104:7)
  at DeploymentsManager.executeDeployScripts (node_modules/hardhat-deploy/src/DeploymentsManager.ts:954:15)
  at DeploymentsManager.runDeploy (node_modules/hardhat-deploy/src/DeploymentsManager.ts:906:16)
  at Object.fixture (node_modules/hardhat-deploy/src/DeploymentsManager.ts:311:9)

● validateRule › allows listed assets

ERROR processing skip func of /home/eakarsu/Research/enzyme/protocol/deploy/scripts/config/Mainnet.ts:
TypeError: Unable to require file: packages/protocol/src/index.ts
This is usually the result of a faulty configuration or import. Make sure there is a `.js`, `.json` or other executable extension with loader attached before `ts-node` available.

  at getOutput (node_modules/ts-node/src/index.ts:891:17)
  at Object.compile (node_modules/ts-node/src/index.ts:1185:30)
  at Module.m._compile (node_modules/ts-node/src/index.ts:1309:30)
  at require.extensions.<computed> (node_modules/ts-node/src/index.ts:1313:12)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at newLoader (node_modules/pirates/lib/index.js:104:7)
  at Object.newLoader [as .ts] (node_modules/pirates/lib/index.js:104:7)
  at DeploymentsManager.executeDeployScripts (node_modules/hardhat-deploy/src/DeploymentsManager.ts:954:15)
  at DeploymentsManager.runDeploy (node_modules/hardhat-deploy/src/DeploymentsManager.ts:906:16)
  at Object.fixture (node_modules/hardhat-deploy/src/DeploymentsManager.ts:311:9)

Test Suites: 90 failed, 1 skipped, 90 of 91 total Tests: 984 failed, 29 skipped, 44 todo, 1057 total Snapshots: 0 total Time: 46.101 s Ran all test suites in 10 projects.

SeanJCasey commented 2 years ago

Hey @eakarsu , we just pushed a more recent commit which should hopefully solve the issue.

If it doesn't fix itself, can you please try deleting your local node_modules dir and check that you're using node 14+

eakarsu commented 2 years ago

Super Sean. Thanks for quick resolution. I will test it

eakarsu commented 2 years ago

Looks like all test cases passed. How can I test it against local hardhat node? thanks A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks.

Test Suites: 1 skipped, 94 passed, 94 of 95 total Tests: 29 skipped, 45 todo, 1012 passed, 1086 total Snapshots: 0 total Time: 360.352 s Ran all test suites in 11 projects. Done in 363.73s.

eakarsu commented 2 years ago

It is fixed