Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jzvikart committed Dec 16, 2024
1 parent 9b0302c commit 87f862f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/testLibrary.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { spawn } from 'node:child_process';
import { stringToUuid } from '../packages/core/dist/index.js';
import { spawn } from "node:child_process";
import { stringToUuid } from "../packages/core/dist/index.js";
import path from "path";

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

async function startAgent(character = DEFAULT_CHARACTER) {
log(`Starting agent for character: ${character}`);
const proc = spawn("pnpm", ["start", `--character=characters/${character}.character.json`, '--non-interactive'], { shell: true, "stdio": "inherit" });
const proc = spawn("pnpm", ["start", `--character=characters/${character}.character.json`, '--non-interactive'], {
cwd: projectRoot(),
shell: true,
stdio: "inherit"
});
log(`proc=${JSON.stringify(proc)}`);

const startTime = Date.now();
const url = "http://127.0.0.1:3000/";
while (true) {
Expand Down Expand Up @@ -110,7 +114,7 @@ async function runIntegrationTest(fn) {
fn();
log("✓ Test passed");
} catch (error) {
logError(`✗ Test failed: ${error.message}`);
log("✗ Test failed");
logError(error);
process.exit(1);
} finally {
Expand Down

0 comments on commit 87f862f

Please sign in to comment.