Skip to content

[Testing]: Reorganize token test files into structured directory hierarchy #128

@adamgall

Description

@adamgall

Problem

Currently, ERC20 tests are located directly under test/ERC20/, which doesn't scale well as more token standards are added to the project. This flat structure makes it difficult to:

  • Navigate between different token standard tests
  • Maintain consistent organization across token types
  • Group related token functionality together

Proposed Solution

Reorganize test files to follow a hierarchical structure under test/token/ that mirrors the source code organization:

test/
└── token/
    └── ERC20/
        └── ERC20/
            ├── ERC20Facet.t.sol
            ├── LibERC20.t.sol
            └── harnesses/
                ├── ERC20FacetHarness.sol
                └── LibERC20Harness.sol

Benefits

  • Consistency: Aligns test structure with source code organization
  • Scalability: Provides clear location for future token standards (ERC721, ERC1155, etc.)
  • Maintainability: Groups all token-related tests under common parent directory
  • Discoverability: Makes it easier to find and navigate token test files

Implementation

Move existing ERC20 test files from test/ERC20/ to test/token/ERC20/ERC20/:

  • Move test files to new directory structure
  • Update any import paths if necessary
  • Verify all tests still pass after reorganization

Related Work

This reorganization prepares the test suite for upcoming additions of other token standards and maintains consistency with the source code structure under src/token/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions