Skip to content

feat(docs): add runtime execution tests for aztec.js documentation examples#20113

Merged
critesjosh merged 1 commit intonextfrom
jo/docs-example-execution-tests
Mar 3, 2026
Merged

feat(docs): add runtime execution tests for aztec.js documentation examples#20113
critesjosh merged 1 commit intonextfrom
jo/docs-example-execution-tests

Conversation

@critesjosh
Copy link
Contributor

@critesjosh critesjosh commented Feb 2, 2026

Note: This PR is stacked on #20062 and should be merged after it.

Summary

  • Add a test runner (aztecjs_runner) that executes documentation examples against a live network
  • Fix transfer examples to call transfer_to_private() before private transfers (public mint → private transfer flow)
  • Add README explaining how typechecking and execution verification work for docs examples
  • Integrate runner into e2e compose tests where the network is already running

Details

The runner script (run.sh) executes these examples sequentially:

  • aztecjs_connection - Basic network connection and contract deployment
  • aztecjs_getting_started - Token minting and transfers
  • aztecjs_advanced - Advanced patterns (batch calls, sponsored transactions, etc.)
  • aztecjs_authwit - Authentication witnesses
  • aztecjs_testing - Testing patterns with assertions

The runner is invoked from docs_examples.test.ts in the e2e compose tests, which already has a running network via docker-compose.

Test plan

  • Run yarn workspace @aztec/end-to-end test:e2e docs_examples.test.ts against a local network
  • Verify all 5 examples pass

🤖 Generated with Claude Code

@critesjosh critesjosh changed the title test(docs): add runtime execution tests for aztec.js documentation examples feat(docs): add runtime execution tests for aztec.js documentation examples Feb 2, 2026
@critesjosh critesjosh changed the base branch from next to josh/ecodr-727-miscellaneous-docs-updates February 2, 2026 19:11
@AztecBot AztecBot force-pushed the josh/ecodr-727-miscellaneous-docs-updates branch 2 times, most recently from 81cc2df to 53bfb29 Compare February 3, 2026 13:06
Base automatically changed from josh/ecodr-727-miscellaneous-docs-updates to next February 3, 2026 13:42
@critesjosh critesjosh marked this pull request as ready for review February 26, 2026 20:24
@critesjosh critesjosh requested a review from a team as a code owner February 26, 2026 20:24
…amples

> **Note:** This PR is stacked on #20062 and should be merged after it.

## Summary
- Add a test runner (`aztecjs_runner`) that executes documentation examples against a live network
- Fix transfer examples to call `transfer_to_private()` before private transfers (public mint → private transfer flow)
- Add README explaining how typechecking and execution verification work for docs examples
- Integrate runner into e2e compose tests where the network is already running

## Details

The runner script (`run.sh`) executes these examples sequentially:
- `aztecjs_connection` - Basic network connection and contract deployment
- `aztecjs_getting_started` - Token minting and transfers
- `aztecjs_advanced` - Advanced patterns (batch calls, sponsored transactions, etc.)
- `aztecjs_authwit` - Authentication witnesses
- `aztecjs_testing` - Testing patterns with assertions

The runner is invoked from `docs_examples.test.ts` in the e2e compose tests, which already has a running network via docker-compose.

## Test plan
- Run `yarn workspace @aztec/end-to-end test:e2e docs_examples.test.ts` against a local network
- Verify all 5 examples pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@AztecBot AztecBot force-pushed the jo/docs-example-execution-tests branch from 3823c3c to af9a5b0 Compare March 3, 2026 18:32
@AztecBot AztecBot added this pull request to the merge queue Mar 3, 2026
@critesjosh critesjosh added this pull request to the merge queue Mar 3, 2026
Merged via the queue into next with commit 69f7af6 Mar 3, 2026
20 checks passed
@critesjosh critesjosh deleted the jo/docs-example-execution-tests branch March 3, 2026 21:53
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.

3 participants