Files
dbis-thirdweb/apps/smoke-tests
2026-01-01 08:04:06 -08:00
..
2026-01-01 08:04:06 -08:00
2026-01-01 08:04:06 -08:00
2026-01-01 08:04:06 -08:00
2026-01-01 08:04:06 -08:00
2026-01-01 08:04:06 -08:00
2026-01-01 08:04:06 -08:00

Smoke Tests

End-to-end smoke tests for all Chain 138 offerings.

Setup

  1. Create .env file in this directory:
TEST_PRIVATE_KEY=your_private_key_here
TEST_RPC_URL=https://138.rpc.thirdweb.com  # Optional
TEST_RECIPIENT=0x...  # Optional, default test recipient
  1. Install dependencies:
pnpm install

Running Tests

Run all tests:

pnpm test

Run specific test suite:

pnpm test:wallets
pnpm test:x402
pnpm test:bridge
pnpm test:tokens
pnpm test:ai
pnpm test:http-api

Test Coverage

  • Wallets: Connect, sign message, native transfer, chain switching
  • x402: Payment request creation, fulfillment, receipt verification, replay protection
  • Bridge: Route validation, quote generation, token lists
  • Tokens: ERC20 deploy, mint, transfer, balance queries
  • AI: Read actions (balance, block height), write actions (transfer), prompt validation
  • HTTP API: Client creation, configuration validation

Notes

  • Tests requiring write operations need TEST_PRIVATE_KEY set
  • Some tests may skip if private key is not provided
  • Tests use Chain 138 testnet/mainnet as configured