Skip to content

Add Hardhat test suite for ListingRegistry.sol#18

Open
ARC7US wants to merge 1 commit into
Nobayprotocol:mainfrom
ARC7US:feature/listing-registry-tests
Open

Add Hardhat test suite for ListingRegistry.sol#18
ARC7US wants to merge 1 commit into
Nobayprotocol:mainfrom
ARC7US:feature/listing-registry-tests

Conversation

@ARC7US
Copy link
Copy Markdown

@ARC7US ARC7US commented May 24, 2026

Summary

  • 26 tests covering all contract functionality
  • Signature validity tests (EIP-712 compliant)
  • Rejection of invalid signatures
  • Event emission verification
  • Seller mapping and metadata accuracy
  • Revoke and force revoke functionality

All tests passing.

Test Coverage

  • Deployment tests (3)
  • Signature validity tests (3)
  • Invalid signature rejection tests (6)
  • Event emission tests (3)
  • Seller mapping and metadata tests (6)
  • Revoke listing tests (3)
  • Force revoke tests (2)

Changes

  • Added hardhat.config.js
  • Added package.json with Hardhat dependencies
  • Added test/ListingRegistry.test.cjs with comprehensive test suite
  • Updated OpenZeppelin imports for v5 compatibility

Testing

Run tests with:

npx hardhat test test/ListingRegistry.test.cjs

All 26 tests pass.

- 26 tests covering all contract functionality
- Signature validity tests (EIP-712 compliant)
- Rejection of invalid signatures
- Event emission verification
- Seller mapping and metadata accuracy
- Revoke and force revoke functionality

All tests passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant