mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
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.
19 lines
604 B
TypeScript
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"] } },
|
|
});
|