mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix: resolve workspace source dependencies in tests
This commit is contained in:
parent
c30cda1d43
commit
6ee906d3d2
5 changed files with 18 additions and 10 deletions
|
|
@ -6,6 +6,7 @@ import { afterEach, describe, expect, it } from "vitest";
|
|||
import { ENV_AGENT_DIR } from "../src/config.ts";
|
||||
|
||||
const cliPath = resolve(__dirname, "../src/cli.ts");
|
||||
const sourceResolverPath = resolve(__dirname, "../src/experimental/source-resolver.ts");
|
||||
const tempDirs: string[] = [];
|
||||
|
||||
afterEach(() => {
|
||||
|
|
@ -65,13 +66,12 @@ function readSessionInfoNames(sessionFile: string): string[] {
|
|||
|
||||
async function runCli(args: string[], dirs: CliDirs): Promise<CliResult> {
|
||||
let stderr = "";
|
||||
const child = spawn(process.execPath, [cliPath, ...args], {
|
||||
const child = spawn(process.execPath, ["--import", sourceResolverPath, cliPath, ...args], {
|
||||
cwd: dirs.projectDir,
|
||||
env: {
|
||||
...process.env,
|
||||
[ENV_AGENT_DIR]: dirs.agentDir,
|
||||
PI_OFFLINE: "1",
|
||||
TSX_TSCONFIG_PATH: resolve(__dirname, "../../../tsconfig.json"),
|
||||
},
|
||||
stdio: ["ignore", "ignore", "pipe"],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue