OpenZeppelin / OpenZeppelin/compact-contracts
dev: make .property.test.ts mean one thing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
🧐 Motivation
.property.test.ts currently means two different things.
NativeShieldedTokenPublicSupply.property.test.ts is stateful invariant fuzzing — random op sequences checked against a shadow model. The confidential note token core adopts a narrower split:
.property.test.ts— stateless properties: generated inputs, single calls, no ledger.invariants.test.ts— stateful: generated op sequences plus a shadow model
Two meanings for one suffix is worse than no convention.
📝 Details
- rename
NativeShieldedTokenPublicSupply.property.test.ts→.invariants.test.ts(its content is stateful) - record the convention in
GUIDELINES.md§ Testing, which already mentions property-based tests but not the file naming
✅ Acceptance criteria
- one meaning per suffix across the repo
- the split is documented, not just implied by filenames
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating NativeShieldedTokenPublicSupply.property.test.ts and GUIDELINES.md § Testing. Review the test's stateful shadow-model behavior, rename it to .invariants.test.ts, document the stateless/stateful naming split, and verify repository references and tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, testing-qa
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100