Run in-memory AOS tests. For HyperBEAM integration tests, use /test-hb instead.
Examples
code
/test # run all tests /test test/token.test.js # run specific file
Steps
- •Kill any stale
beam.smpor HyperBEAM processes that may be lingering on ports 10000-10010:
bash
lsof -ti :10000-10010 | xargs -r kill -9 2>/dev/null || true pkill -f beam.smp 2>/dev/null || true
- •Run the tests:
bash
# Specific file (if argument provided) yarn test $ARGUMENTS # All tests (if no argument) yarn test
- •Report results:
- •Show pass/fail count
- •If failures, show the failing test names and error messages
- •Suggest fixes if the errors are obvious
Troubleshooting
Tests hang indefinitely
- •Likely cause:
Send().receive()in Lua source — does NOT work on genesis-wasm - •Fix: Replace with fire-and-forget
Send()+ separate handler - •Also check for infinite loops in Lua state
"Cannot find module wao/test"
- •Run
yarn installto ensure dependencies are installed - •Check
package.jsonhas"wao"in dependencies
WASM memory error
- •Ensure
--experimental-wasm-memory64flag is in the test command - •Node.js 20+ required