0fe761dc4b
- Added tsconfig.publish.json files to all packages with optimized publish-time configuration. - Updated all package.json scripts with prepublishOnly hooks for correct type checking during publish. - Added @oh-my-pi/omp-stats path mappings to root tsconfig.json for consistent imports. - Added WASM generation script for photon module and integrated into install:dev script.
24 lines
864 B
TypeScript
24 lines
864 B
TypeScript
import { describe, expect, it } from "bun:test";
|
|
import { SettingsManager } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
|
|
describe("SettingsManager python settings", () => {
|
|
it("defaults to both and session", () => {
|
|
const settings = SettingsManager.inMemory();
|
|
|
|
expect(settings.getPythonToolMode()).toBe("both");
|
|
expect(settings.getPythonKernelMode()).toBe("session");
|
|
});
|
|
|
|
it("persists python tool and kernel modes", async () => {
|
|
const settings = SettingsManager.inMemory();
|
|
|
|
await settings.setPythonToolMode("bash-only");
|
|
await settings.setPythonKernelMode("per-call");
|
|
|
|
expect(settings.getPythonToolMode()).toBe("bash-only");
|
|
expect(settings.getPythonKernelMode()).toBe("per-call");
|
|
expect(settings.serialize().python?.toolMode).toBe("bash-only");
|
|
expect(settings.serialize().python?.kernelMode).toBe("per-call");
|
|
});
|
|
});
|