Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(scripts): cover staged module paths under changed cwd

Steven Enamakelaa9092e18bd4
diff --git a/scripts/__tests__/test-module-installation.test.mjs b/scripts/__tests__/test-module-installation.test.mjs
index 932c7016c9..3482ed0afc 100644
--- a/scripts/__tests__/test-module-installation.test.mjs
+++ b/scripts/__tests__/test-module-installation.test.mjs
@@ -156,6 +156,15 @@ test("CI exports the staged TinyMCP library for the multi-server suite", () => {
);
});
+test("staged module paths stay valid when tests change their working directory", () => {
+ const source = readFileSync(installer, "utf8");
+ assert.match(
+ source,
+ /dest="\$\(cd "\$\{dest\}" && pwd -P\)"/,
+ "the exported module paths must be absolute for subprocesses with a different cwd",
+ );
+});
+
test("CI exports the staged TinyChannels library for its runtime suite", () => {
const source = readFileSync(installer, "utf8");
assert.match(