Run HyperBEAM integration tests. These spawn a real Erlang node — different from in-memory AOS tests (/test).
Steps
- •Kill any stale HyperBEAM / beam.smp processes:
bash
lsof -ti :10000-10010 | xargs -r kill -9 2>/dev/null || true pkill -f beam.smp 2>/dev/null || true
- •Check that HyperBEAM is configured via
.env.hyperbeam:
bash
grep '^CWD=' .env.hyperbeam 2>/dev/null | cut -d= -f2-
If .env.hyperbeam doesn't exist or has no CWD, STOP and tell the user:
No HyperBEAM configured. Integration tests require a HyperBEAM installation.
During project creation (
npx wao create), choose option 1 (clone) or 2 (link). Or configure it now:bashecho "CWD=/path/to/your/HyperBEAM" >> .env.hyperbeam
Then verify the path exists:
bash
HB_DIR=$(grep '^CWD=' .env.hyperbeam | cut -d= -f2-) test -d "$HB_DIR/src" && echo "HyperBEAM: OK" || echo "HyperBEAM: MISSING"
If MISSING, stop and tell the user the CWD path in .env.hyperbeam is invalid.
- •Run the tests:
bash
# Specific file (if argument provided) yarn test $ARGUMENTS # Default HyperBEAM tests yarn test test/hyperbeam.test.js
The HyperBEAM class reads .env.hyperbeam automatically via dotenv, so it picks up the correct CWD.
- •Report results:
- •Show pass/fail count
- •If HyperBEAM fails to start, check Erlang/OTP is installed (
erl -eval 'halt().') - •If port conflicts, suggest running
/test-hbagain (it cleans up first) - •Always ensure HyperBEAM process was killed after tests
Troubleshooting
HyperBEAM fails to start
- •Check Erlang is installed:
erl -eval 'halt().' - •Requires Erlang/OTP 27+
- •Check
.env.hyperbeamCWD path is valid
Port already in use after cleanup
- •Wait 2-3 seconds for port release, then retry
- •Check for zombie processes:
ps aux | grep beam
Tests pass locally but fail in CI
- •CI may lack Erlang — skip HB tests with env flag
- •Ensure HyperBEAM binary is cached in CI