Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress duplicate defn logs in hardhat test #5790

Merged
merged 4 commits into from
Jan 26, 2022

Conversation

makramkd
Copy link
Contributor

@makramkd makramkd commented Jan 12, 2022

Ticket: https://app.shortcut.com/chainlinklabs/story/23899/lots-of-duplicate-definition-log-spam-when-running-hardhat-test

Before:

  AggregatorFacade
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
    ✓ has a limited public interface [ @skip-coverage ]
    #constructor
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
      ✓ uses the decimals set in the constructor
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
      ✓ uses the description set in the constructor
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
      ✓ sets the version to 2
    #getAnswer/latestAnswer
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
      ✓ pulls the rate from the aggregator
    #getTimestamp/latestTimestamp
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))

After:

AggregatorFacade
    ✓ has a limited public interface [ @skip-coverage ]
    #constructor
      ✓ uses the decimals set in the constructor
      ✓ uses the description set in the constructor
      ✓ sets the version to 2
    #getAnswer/latestAnswer
      ✓ pulls the rate from the aggregator
    #getTimestamp/latestTimestamp
      ✓ pulls the timestamp from the aggregator
    #getRoundData
      ✓ assembles the requested round data
      ✓ returns zero data for non-existing rounds
    #latestRoundData
      ✓ assembles the requested round data
      when there is no latest round
        ✓ assembles the requested round data

Fix from: ethers-io/ethers.js#379 and https://github.com/smartcontractkit/LinkToken/blob/7ab441d5a3e01f3d195cb30ac43be99fe796e921/test/v0.6/LinkToken.test.ts#L2

@github-actions
Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@makramkd makramkd marked this pull request as ready for review January 12, 2022 16:06
@makramkd makramkd merged commit f5c7607 into develop Jan 26, 2022
@makramkd makramkd deleted the chore/sc-23899/fix-hhtest-logspam branch January 26, 2022 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants