test(anchor): include node stderr in behavior guard failures

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Frank SongandPaperclip committed 2026-06-28 15:03:19 +08:00
1 parent 0f41d01d0f
commit 9c0eecfbe9
1 file changed
+7 -1
+7 -1
View File
@@ -46,11 +46,17 @@ def _run_node_script(script: str) -> str:
pytest.skip("node executable is required for JavaScript behavior checks")
result = subprocess.run(
[node, "-e", script],
check=True,
cwd=ROOT,
text=True,
capture_output=True,
)
if result.returncode:
pytest.fail(
"node behavior check failed"
f"\nexit code: {result.returncode}"
f"\nstdout:\n{result.stdout or '<empty>'}"
f"\nstderr:\n{result.stderr or '<empty>'}",
)
return result.stdout.strip()