Testing Overview
Start with Before a PR when choosing checks for a change. The matrices below document the broader Solidity coverage and invariants.
Before a PR
| Change | Minimum check |
|---|---|
| Docs | pnpm docs:build |
| Solidity logic | make test |
| Share accounting or lifecycle | make test && make test-invariant |
| Frontend | pnpm app:build |
| App unit tests | pnpm --filter tap-app test:nav |
| App e2e | pnpm app:test:e2e |
| Shared units | pnpm test:units |
Commands
| Goal | Command |
|---|---|
| Build contracts | make build |
| Solidity tests | make test or pnpm test |
| Verbose tests | make test-v |
| Invariants | make test-invariant |
| Deep invariants | make test-invariant-deep |
| Docs build | pnpm docs:build |
| Frontend build | pnpm app:build |
| App unit tests | pnpm --filter tap-app test:nav |
| App e2e | pnpm app:test:e2e |
@tap/units | pnpm test:units |
Compiler pin is Solidity 0.8.37 (chain/foundry.toml). EVM target is osaka (Plume Fusaka). CI installs Foundry v1.8.3.
Solidity coverage
| Area | Files |
|---|---|
| Cap table setup | CapTable.t.sol, CapTableFactory.t.sol, Issuer.t.sol |
| Access control | AccessControl.t.sol, Wallet.t.sol |
| Stock lifecycle | StockIssuance.t.sol, StockTransfer.t.sol, StockCancellation.t.sol, StockRepurchase.t.sol, StockReissuance.t.sol, StockRetraction.t.sol, StockAcceptance.t.sol |
| Setup records | Stakeholder.t.sol, StockClass.t.sol, Minting.t.sol |
| Share adjustments | Adjustment.t.sol |
| Invariants | test/invariants/CapTableInvariants.t.sol |
Invariants
| Property | Purpose |
|---|---|
Issuer shares_issued <= shares_authorized | Prevent issuer over-issuance. |
Class shares_issued <= shares_authorized | Prevent class over-issuance. |
| Stakeholder and stock class counts stay consistent. | Catch index drift. |
| Active position tracking stays consistent. | Catch stale securities and missing deletes. |
Last updated on