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

refactor(tests/e2e-evm): Restructure ABI tests for extensibility & reduce duplication #2031

Open
wants to merge 11 commits into
base: nd-implement-basic-precompile-calling
Choose a base branch
from

Commits on Oct 8, 2024

  1. Configuration menu
    Copy the full SHA
    dd9b489 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5737b3b View commit details
    Browse the repository at this point in the history
  3. fix: Use separate shouldRun fn signatures for fallback tests

    Fallback tests are not run on each function but rather only for the specific fallback.
    This means whether or not to run the test is determined by only the receive and fallback
    functions, without any other ABI function.
    drklee3 committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    b184907 View commit details
    Browse the repository at this point in the history
  4. fix: Resolve use of type assertions, enforcing types

    Previously used type assertions to bypass certain TypeScript issues with
    test cases, along with using any & unsafe assignments. This resolves the
    types to be properly valid and enforced to prevent any potential errors.
    drklee3 committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    815415c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ec0ffe View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. refactor: Dynamic generation basic ABI test cases

    Changes from including a field in each test case from conditionally
    running the case, to building the cases dynamically. This allows for
    logical grouping of test cases and organization with logic instead of
    using comments. Slightly less explicit for each test case, but with the
    grouping of test cases, it reduces the mental overhead of figuring out
    when each test case is run.
    drklee3 committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    4df0c17 View commit details
    Browse the repository at this point in the history
  2. refactor: Resolve ABI disabled types & errors

    Resolves use type casting and unsafe access, validation of revert errors
    for matches and types
    drklee3 committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    cd15cde View commit details
    Browse the repository at this point in the history
  3. refactor: Only test receive, fallback funcs when available

    Previously runs all the time, which is currently okay with the current
    single testing contract that includes both functions. This conditionally
    adds these test cases if the respective functions exist so we can test
    additional contract behavior that may not have these functions and may
    produce a different error.
    drklee3 committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    0f248d2 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. lint: Ignore solhint issues for mock contracts

    Most of these issues are intentional and are okay to ignore. This also
    sets the solhint ignoreConstructors option to true for the
    func-visibility rule, as we are using solidity >=0.7.0
    drklee3 committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    8a90bbc View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. Configuration menu
    Copy the full SHA
    1d98340 View commit details
    Browse the repository at this point in the history
  2. chore: Disable chai assertion error truncation

    Long errors are truncated and difficult to determine the issue otherwise
    drklee3 committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    70f72d8 View commit details
    Browse the repository at this point in the history