Skip to content

Commit 87f862f

Browse files
committed
Fixes
1 parent 9b0302c commit 87f862f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tests/testLibrary.mjs

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { spawn } from 'node:child_process';
2-
import { stringToUuid } from '../packages/core/dist/index.js';
1+
import { spawn } from "node:child_process";
2+
import { stringToUuid } from "../packages/core/dist/index.js";
3+
import path from "path";
34

45
export const DEFAULT_CHARACTER = "trump"
56
export const DEFAULT_AGENT_ID = stringToUuid(DEFAULT_CHARACTER ?? uuidv4());
@@ -46,9 +47,12 @@ async function writeEnvFile(entries) {
4647

4748
async function startAgent(character = DEFAULT_CHARACTER) {
4849
log(`Starting agent for character: ${character}`);
49-
const proc = spawn("pnpm", ["start", `--character=characters/${character}.character.json`, '--non-interactive'], { shell: true, "stdio": "inherit" });
50+
const proc = spawn("pnpm", ["start", `--character=characters/${character}.character.json`, '--non-interactive'], {
51+
cwd: projectRoot(),
52+
shell: true,
53+
stdio: "inherit"
54+
});
5055
log(`proc=${JSON.stringify(proc)}`);
51-
5256
const startTime = Date.now();
5357
const url = "http://127.0.0.1:3000/";
5458
while (true) {
@@ -110,7 +114,7 @@ async function runIntegrationTest(fn) {
110114
fn();
111115
log("✓ Test passed");
112116
} catch (error) {
113-
logError(`✗ Test failed: ${error.message}`);
117+
log("✗ Test failed");
114118
logError(error);
115119
process.exit(1);
116120
} finally {

0 commit comments

Comments
 (0)