Skip to content

Commit c804dd2

Browse files
dishanagalawattaMuse Spark 1.3 Free
andcommitted
fix: pass explicit test files to node --test (dir arg broken on Node 22)
Node >=21 regressed directory arguments to --test (nodejs/node#64555): the dir is executed as a module -> MODULE_NOT_FOUND, so the pinned Node 22 CI failed while local Node 26 passed. Shell-expanded 'test/test-*.mjs' works on every supported version (engines: >=18). Sync package.json test script + README/AGENTS.md commands (same bug via npm test). Co-Authored-By: Muse Spark 1.3 Free <[email protected]>
1 parent b38868a commit c804dd2

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
node --check client/node/src/protocol.mjs
177177
node --check client/node/src/harnesses.mjs
178178
node --check client/node/src/cli.mjs
179-
node --test client/node/test/
179+
node --test client/node/test/test-*.mjs
180180

181181
- name: Node client configure dry-run (9 harnesses, token-free)
182182
run: |

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Co-Authored-By: Muse Spark 1.3 Free <[email protected]>
2121
| Export phone CA (verified direct mode) | `phone-mcp export-ca --host <ip> --port 8080 --sha256 <hex> --out ./phone-mcp-ca.pem` (or `./scripts/export-ca.sh …`) |
2222
| Bridge unit tests | `python3 -m unittest discover -s bridges -p "test_*.py"` |
2323
| Client unit + integration tests (Python) | `python3 -m unittest discover -s client/tests` (`pip install -e ./client` for the `phone-mcp` CLI) |
24-
| Client tests (Node twin) | `node --test client/node/test/` (`npm install -g ./client/node` for the `phone-mcp` CLI) |
24+
| Client tests (Node twin) | `node --test client/node/test/test-*.mjs` (`npm install -g ./client/node` for the `phone-mcp` CLI) |
2525
| Agent skills gate (6 skills, 41/41) | `python3 scripts/verify-skills.py` |
2626
| Agent skills eval (static + live battery) | `python3 scripts/eval-skills.py` |
2727
| BLE proof (needs `BLE_PEER` MAC on LAN) | `BLE_PEER=AA:BB:CC:DD:EE:FF ./scripts/verify-mcp.sh <ip>:8080` (+ auto-disconnect) |

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ phone-mcp configure --harness all --out ./generated-harness
162162
phone-mcp configure --harness opencode --install
163163
```
164164

165-
- No-Python hosts: `npm install -g ./client/node` (same CLI, 9 harnesses; tests: `node --test client/node/test/`).
165+
- No-Python hosts: `npm install -g ./client/node` (same CLI, 9 harnesses; tests: `node --test client/node/test/test-*.mjs`).
166166
- No-install fallback (same protocol, single file): `bridges/phone-mcp-bridge.mjs` (Node 18+) or `bridges/phone-mcp-bridge.py` (stdlib Python) + `./scripts/configure-harness.sh --from-qr '<qr-json>' --harness all` + `python3 scripts/phone-mcp-smoke.py …`.
167167

168168
## Architecture
@@ -218,7 +218,7 @@ Local-only. Full reference: `docs/environments.md` + `.env.example`.
218218
| Harness smoke | `phone-mcp smoke --timeout 20` |
219219
| Bridge unit tests | `python3 -m unittest discover -s bridges -p "test_*.py"` |
220220
| Client tests (Python) | `python3 -m unittest discover -s client/tests` |
221-
| Client tests (Node) | `node --test client/node/test/` |
221+
| Client tests (Node) | `node --test client/node/test/test-*.mjs` |
222222
| Agent skills gate (6 skills, 41/41) | `python3 scripts/verify-skills.py` |
223223
| Agent skills eval (static + live battery) | `python3 scripts/eval-skills.py` |
224224

‎client/node/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"node": ">=18"
1111
},
1212
"scripts": {
13-
"test": "node --test test/"
13+
"test": "node --test test/test-*.mjs"
1414
},
1515
"keywords": ["mcp", "model-context-protocol", "android", "opencode", "claude", "codex"],
1616
"license": "UNLICENSED",

0 commit comments

Comments
 (0)