OpenZeppelin / OpenZeppelin/compact-contracts

dev: make .property.test.ts mean one thing

Open Beginner friendly
#751 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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.tsstateless properties: generated inputs, single calls, no ledger
  • .invariants.test.tsstateful: 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.