hardhat-gas-reporter icon indicating copy to clipboard operation
hardhat-gas-reporter copied to clipboard

Gas reporter hides Mocha test durations

Open erhant opened this issue 1 year ago • 0 comments

Mocha normally displays a duration for each test, when it exceeds the slow parameter. See https://mochajs.org/#test-duration Enabling gas reporter hides this test duration report, even if you set slow to be 0.

You can test with the following hardhat configuration:

gasReporter: {
    enabled: true // set false to see durations by mocha
  },
  mocha: {
    slow: 0 // (ms) set slow to 0 to display all durations, default 75ms
  },

As a workaround for now, I just wrote console.time(someLabel) under beforeEach and console.timeEnd(someLabel) under afterEach.

erhant avatar Aug 04 '22 10:08 erhant