question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to collect gas data in before / beforeEach blocks

See original GitHub issue

So i just want to check what are the dependencies to get this to run. I have done a simple unbox, getting metacoin example. ~/code/truffle/node_modules/.bin/truffle unbox Yes im running from the cloned main repo cause im testing some other stuff that needs new developments

Then I got this lib npm install --save-dev eth-gas-reporter I started a truffle develop instance on the side. ~/code/truffle/node_modules/.bin/truffle develop I configured the truffle.js with mock example and added network truffle to target truffle develop instance.

module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*" // Match any network id
    },
    truffle: {
      host: "localhost",
      port: 9545,
      network_id: "*" // Match any network id
    },
    mocha: {
      reporter: 'eth-gas-reporter'
    }
  }
};

The I ran truffle test ~/code/truffle/node_modules/.bin/truffle test --network truffle

But no report.

What did I miss along the way?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
cgeweckecommented, Aug 15, 2018

Ah ok! I’ll ping you.

0reactions
vongohrencommented, Nov 16, 2019

@cgewecke did anything happen here 😃? Was doing some cleaning of open issues

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress basics: before(), beforeEach(), after() and afterEach()
In my tests, I add data to these empty arrays as needed. What should you put in these blocks? I like to think...
Read more >
why beforeEach() works in nested describe but beforeAll ...
The beforeEach in the outer describe won't fire before each of the nested describe sections, it fires before each "it" within the describes....
Read more >
Setting Up testing data with beforeEach() | Unit testing tutorial
Learn how to save time and not recreate the wheel by using the beforeEach () method.Code with confidence and lower your stress levels...
Read more >
Describe block with async function behaving weirdly #2975
Does the before block really look something like this? ... it s inside it followed by run() , then add the --delay option...
Read more >
Setup and Teardown - Jest
By default, the beforeAll and afterAll blocks apply to every test in a file. You can also group tests together using a describe...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found