Closed yuliyu123 closed 2 years ago
can't run any tests when execute npm run test and npm run test:coverage is also invalid.
➜ coderfordao git:(main) npm run test > codefordao-contracts@0.1.0 test > npx hardhat test --network hardhat Compiled 68 Solidity files successfully 0 passing (0ms)
npm run test:coverage:
Compiled 68 Solidity files successfully Network Info ============ > HardhatEVM: v2.9.0 > network: hardhat 0 passing (0ms) -----------------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -----------------------|----------|----------|----------|----------|----------------| core/ | 0 | 0 | 0 | 0 | | Governor.sol | 0 | 0 | 0 | 0 |... 118,127,136 | Membership.sol | 0 | 0 | 0 | 0 |... 273,284,294 | Module.sol | 0 | 0 | 0 | 0 |... 216,226,227 | Share.sol | 0 | 0 | 0 | 0 |... 55,59,67,75 | Treasury.sol | 0 | 0 | 0 | 0 |... 241,242,243 |
looking for the reason why it does not work, try to run npm run test:membership spec test instead, it works.
npm run test:membership
just fixed the problem, it was caused by the missing ./tests path config in hardhat.config.js
./tests
hardhat.config.js
can't run any tests when execute npm run test and npm run test:coverage is also invalid.
npm run test:coverage: