Skip to main content
stacksdapp test runs contract tests (Clarinet SDK) and frontend tests (Vitest). No Docker or local devnet is required for contract tests.

Contents

Run all tests

This runs:
  • Contracts: Vitest + Clarinet SDK (initSimnet()) in contracts/tests/
  • Frontend: Vitest in frontend/ (vitest run --passWithNoTests)

Contract tests

Tests live under contracts/tests/.
Requires Clarinet 3.21+ and matching @stacks/clarinet-sdk in the contracts package.

ABI caching

Contract ABIs are cached under contracts/.cache/. Unchanged sources skip redundant initSimnet runs during generate and test workflows.

Type-check before testing

Validates Clarity syntax and types without deployment.

Frontend tests

Frontend Vitest suites live under frontend/. They run as part of stacksdapp test even if you have not written tests yet.

Tips

  • Use simnet tests for contract logic
  • Use local devnet or testnet for full wallet flows
  • After editing contracts, run stacksdapp generate so bindings stay aligned with tests that import generated code