Imported as a linear vendor commit so forge rebases do not replay the upstream root tree. git-subtree-dir: third_party/pi git-subtree-split: d981de1229ef899957bbe968bc8dcda02a21f477
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { fileURLToPath } from "node:url";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
const telemetrySrcIndex = fileURLToPath(new URL("../telemetry/src/index.ts", import.meta.url));
|
|
const aiSrcIndex = fileURLToPath(new URL("../ai/src/index.ts", import.meta.url));
|
|
const aiSrcCompat = fileURLToPath(new URL("../ai/src/compat.ts", import.meta.url));
|
|
const agentSrcIndex = fileURLToPath(new URL("./src/index.ts", import.meta.url));
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: "node",
|
|
testTimeout: 30000, // 30 seconds for API calls
|
|
reporters: process.env.GITHUB_ACTIONS ? ["dot", "github-actions"] : ["dot"],
|
|
silent: "passed-only",
|
|
},
|
|
resolve: {
|
|
conditions: ["source"],
|
|
alias: [
|
|
{ find: /^@earendil-works\/pi-telemetry$/, replacement: telemetrySrcIndex },
|
|
{ find: /^@earendil-works\/pi-agent-core$/, replacement: agentSrcIndex },
|
|
{ find: /^@earendil-works\/pi-ai$/, replacement: aiSrcIndex },
|
|
{ find: /^@earendil-works\/pi-ai\/compat$/, replacement: aiSrcCompat },
|
|
],
|
|
},
|
|
ssr: { resolve: { conditions: ["source"] } },
|
|
});
|