-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
Description
Testing Issue
- Test files repeat a lot of setup logic.
- There is no standardized base test contract or shared utilities, so patterns and helpers may differ across files.
- Tests don’t consistently follow a structured framework (e.g. BTT), leaving contributors without a clear testing specification or naming convention.
- It’s hard to see, at a glance, what behaviours and edge cases are intended to be covered by a suite.
Description
- Introduce a shared base test contract + utilities for common setup and assertions
- Refactor existing tests to inherit from this base and remove duplicated logic
- Adopt BTT-style (
given/when/then) naming and structure across the test suite - Handle the refactor through multiple focused PRs
Proposed Plan / Checklist
-
Introduce shared base test contract + utilities
- Common setup (fixtures, actors, deployment helpers, etc.)
- Shared assertion / revert helpers and utilities
-
For each test suite:
- Refactor to use the shared base test contract
- Refactor tests to BTT-style (
given/when/then) naming and structure - Generate a
.treespec
Implementation note:
- First PR: introduce shared base test contract + utilities.
- Follow-up PRs: one PR per test suite (or small group of suites) to adopt the base contract and implement BTT.
Target File/Function(s) being tested
- Entire test suite (all contracts under
test/)
Recommended VSCode Extensions (optional)
These are not required, but useful:
- Tree – syntax highlighting for
.treefiles - ASCII Tree Generator – convenient way to generate ASCII trees for specs