NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.06k stars 1.36k forks source link

No stack trace printed after running tests #591

Closed PaulRBerg closed 4 years ago

PaulRBerg commented 4 years ago

Here's my smart contract and test file:

I'm getting the first wallet from waffle like this:

const [wallet] = await waffle.provider.getWallets();

And I intentionally made one test fail to check if the stack trace is printed in the terminal, but unfortunately it doesn't work:

1) should count down:
Error: VM Exception while processing transaction: revert Uint256 underflow
 at Counter.countDown (contracts/Counter.sol:25)
 at processTicksAndRejections (internal/process/task_queues.js:97:5)
 at EthModule._estimateGasAction (/Users/paulrberg/Projects/Sablier/Magellan/Protocol/node_modules/@nomiclabs/buidler/src/internal/buidler-evm/provider/modules/eth.ts:388:9)
 at BuidlerEVMProvider.send (/Users/paulrberg/Projects/Sablier/Magellan/Protocol/node_modules/@nomiclabs/buidler/src/internal/buidler-evm/provider/provider.ts:82:14)
 at WaffleMockProviderAdapter.send (/Users/paulrberg/Projects/Sablier/Magellan/Protocol/node_modules/@nomiclabs/buidler-waffle/src/waffle-provider-adapter.ts:30:20)
 at async Promise.all (index 3)

Possibly related: https://github.com/EthWorks/Waffle/issues/270

Stack:

PaulRBerg commented 4 years ago

Silly me - the stack trace is right there, on the third line. My IDE applies a gray-ish color to all lines below the "Error" line.