mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
test(photon): copy sidecar helper modules into the spectrum-patch fixture
index.mjs now imports sibling .mjs helpers (send-format, stream-staleness); the fixture copied only index.mjs so the sidecar died on module resolution before reaching the health endpoint.
This commit is contained in:
parent
dcace573da
commit
f2364f1f81
1 changed files with 6 additions and 0 deletions
|
|
@ -36,6 +36,12 @@ def _write_sidecar_fixture(tmp_path: Path, *, sdk_available: bool) -> Path:
|
|||
sidecar = tmp_path / "sidecar"
|
||||
sidecar.mkdir()
|
||||
shutil.copyfile("plugins/platforms/photon/sidecar/index.mjs", sidecar / "index.mjs")
|
||||
# index.mjs imports sibling helper modules — copy every non-patch .mjs so
|
||||
# the fixture keeps working as helpers are extracted from index.mjs.
|
||||
for helper in Path("plugins/platforms/photon/sidecar").glob("*.mjs"):
|
||||
if helper.name in ("index.mjs", "patch-spectrum-mixed-attachments.mjs"):
|
||||
continue
|
||||
shutil.copyfile(helper, sidecar / helper.name)
|
||||
(sidecar / "patch-spectrum-mixed-attachments.mjs").write_text(
|
||||
"export function patchSpectrumTs() { throw new Error('forced patch failure'); }\n",
|
||||
encoding="utf-8",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue