Testing

Testing procedures for Mystery Gift platform.

Unit Tests

Run unit tests:

pnpm test

Integration Tests

Wallet Connection

Test wallet connection flow:

  • Connect a Solana wallet
  • Verify $MYS token balance
  • Check token holder entry status

Raffle Flow

Test complete raffle cycle:

  1. Wait for scheduled raffle start
  2. Verify token holder snapshot
  3. Submit free entry via Twitch
  4. Verify winner selection
  5. Check NFT transfer to winner wallet
  6. Verify Twitter announcement

Marketplace Testing

Test pack purchase and opening:

  1. Connect wallet with $MYS
  2. Purchase a pack
  3. Verify payment processing
  4. Open pack (reveal cards)
  5. Verify NFT transfer to wallet
  6. Check inventory display

Load Testing

Test platform under load:

# Use your preferred load testing tool
# Suggestions: k6, locust, artillery

Test Data

Use devnet for testing:

Debugging

Enable debug logging in .env:

DEBUG=*
LOG_LEVEL=debug

Next Steps