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

feat: add tests for filter methods #143

Closed
wants to merge 2 commits into from

Conversation

keroro520
Copy link
Contributor

@keroro520 keroro520 commented Jul 6, 2022

I add some test cases for filter methods.
All of these cases pass on Hardhat network, but all fail on Godwoken network 😂

@Flouse Flouse requested review from ShookLyngs and RetricSu July 6, 2022 14:12
contracts/hardhat.config.js Show resolved Hide resolved
contracts/test/logs.js Show resolved Hide resolved
contracts/test/logs.js Outdated Show resolved Hide resolved
- This change enables interval-mining mode on Hardhat network.
Without this, tx.wait(2) doesn't work(block waiting forever), as Hardhat won't mine new blocks when no new transactions sending.

  Ref: https://hardhat.org/hardhat-network/docs/explanation/mining-modes
@ShookLyngs
Copy link
Contributor

ShookLyngs commented Jul 18, 2022

New features around mainnet regression testing has been merged to the develop branch:

Since tests on mainnet shouldn't waste too much capacity, right now most of test cases are disabled when testing on mainnet. Based on that, we should consider wether the new test case can be used for mainnet regression testing, and write conditional code for it.

For example, if we think that the new test case shouldn't be used for tests on mainnet right now:

const { isGwMainnetV1 } = require('../utils/network');

describe('...', () => {
  if (isGwMainnetV1()) {
    return;
  }

  ...
});

@keroro520
Copy link
Contributor Author

Hi @ShookLyngs, thanks for your suggestion.
I will mark this PR draft first, and then make some optimization(these cases cost too much time) and apply your suggestion later.

@keroro520 keroro520 marked this pull request as draft July 18, 2022 09:22
@Flouse
Copy link
Collaborator

Flouse commented Mar 28, 2023

@Flouse Flouse closed this Mar 28, 2023
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.

5 participants