CodeforDAO / contracts

Solidity smart contracts of CodeforDAO
629 stars 91 forks source link

can't run any tests when execute npm run test #1

Closed yuliyu123 closed 2 years ago

yuliyu123 commented 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 |
guo-yu commented 2 years ago

looking for the reason why it does not work, try to run npm run test:membership spec test instead, it works.

guo-yu commented 2 years ago

just fixed the problem, it was caused by the missing ./tests path config in hardhat.config.js