pi-mono/packages/durable/vitest.config.ts
Mario Zechner 601437d5a7 fix(durable): test execution environment and fix output truncation metadata
Port and extend the agent environment tests for NodeExecutionEnv, output
capture, adaptive publishing, and truncation, including exact-byte
truncation, flushing, line-reader cancellation, spill backpressure, and
Buffer-free UTF-8 counting.

Fix truncation reporting when bytes and lines are both exceeded, when only
bytes are exceeded at the line cap, and when small limits trim multi-byte
edge characters. Report the full size of oversized newline-terminated tail
lines. Resolve durable test imports from source so tests run unbuilt.

Set Pico tool output defaults to 50 KiB and 2,000 lines.
2026-09-24 13:34:46 +02:00

19 lines
604 B
TypeScript

import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const durableSrcIndex = fileURLToPath(new URL("./src/index.ts", import.meta.url));
const durableSrcTesting = fileURLToPath(new URL("./src/testing/index.ts", import.meta.url));
export default defineConfig({
test: {
environment: "node",
},
resolve: {
conditions: ["source"],
alias: [
{ find: /^@earendil-works\/pi-durable$/, replacement: durableSrcIndex },
{ find: /^@earendil-works\/pi-durable\/testing$/, replacement: durableSrcTesting },
],
},
ssr: { resolve: { conditions: ["source"] } },
});