f66e5dba9b
- Removed WASM generation script; use Bun `wasm?raw` loader for imports. - Added bunfig.toml with loaders for `.md`, `.py`, and `.wasm?raw` text imports. - Added types/assets/index.d.ts for global TypeScript module declarations. - Unified TypeScript configuration with tsgo-based checking across monorepo. - Removed build and WASM steps from install and publish pipelines.
25 lines
872 B
TypeScript
25 lines
872 B
TypeScript
import { describe, expect, it } from "bun:test";
|
|
import { type RequestBody, transformRequestBody } from "@oh-my-pi/pi-ai/providers/openai-codex/request-transformer";
|
|
|
|
describe("openai-codex include handling", () => {
|
|
it("always includes reasoning.encrypted_content when caller include is custom", async () => {
|
|
const body: RequestBody = {
|
|
model: "gpt-5.1-codex",
|
|
};
|
|
|
|
const transformed = await transformRequestBody(body, { include: ["foo"] });
|
|
expect(transformed.include).toEqual(["foo", "reasoning.encrypted_content"]);
|
|
});
|
|
|
|
it("does not duplicate reasoning.encrypted_content", async () => {
|
|
const body: RequestBody = {
|
|
model: "gpt-5.1-codex",
|
|
};
|
|
|
|
const transformed = await transformRequestBody(body, {
|
|
include: ["foo", "reasoning.encrypted_content"],
|
|
});
|
|
expect(transformed.include).toEqual(["foo", "reasoning.encrypted_content"]);
|
|
});
|
|
});
|