Skip to content

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 and others added 11 commits January 29, 2026 16:13
Add comments to code snippets explaining where variables come from.
Update prerequisites to link to connection guide.
Use consistent variable naming (aliceAddress, bobAddress) matching
the connection guide.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Updates documentation to reflect changes from PR #19778:
- Remove .wait() calls - send() now returns receipt directly
- Remove .deployed() calls - send() returns contract for deployments
- Add NO_WAIT option and waitForTx utility examples
- Update getTxReceipt to use node instead of wallet

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add new type-checked TypeScript examples in docs/examples/ts/ that get
validated by the bootstrap.sh script during CI. Update aztec.js how-to
guides to reference these examples using #include_code macros.

New example directories:
- aztecjs_connection: Core setup, wallet, accounts, deployment
- aztecjs_authwit: Private/public authwits, revocation
- aztecjs_advanced: NO_WAIT, BatchCall, sponsored FPC, parallel deploy
- aztecjs_testing: Complete test structure

This ensures code snippets in docs stay in sync with API changes.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…m:AztecProtocol/aztec-packages into josh/ecodr-727-miscellaneous-docs-updates
…amples

Adds a test runner that executes documentation examples against a live network
to verify they work correctly. The runner is integrated into the e2e compose
test suite via docs_examples.test.ts.

Changes:
- Add aztecjs_runner with run.sh script that executes examples sequentially
- Fix transfer examples to call transfer_to_private before private transfers
- Add README explaining typechecking and execution verification workflow
- Integrate runner into e2e compose tests where network is already running

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@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
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