BangSo/packages/db/src/memory-config.test.ts

13 lines
425 B
TypeScript

import { describe, expect, it } from "vitest";
import { effectiveMemoryScope } from "./memory-config.js";
describe("effectiveMemoryScope", () => {
it("uses the bot's own scope when set", () => {
expect(effectiveMemoryScope("shared", "isolated")).toBe("shared");
});
it("falls back to the workspace default when the bot has none", () => {
expect(effectiveMemoryScope(null, "shared")).toBe("shared");
});
});