supermemory/packages/ai-sdk/src/tools.unit.test.ts
Dhravya Shah 9c3f84b5cb feat(ai-sdk): re-export full Supermemory tool set from @supermemory/tools
Thin @supermemory/ai-sdk package now mirrors the canonical 7-tool surface
with updated tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 19:39:57 -07:00

28 lines
786 B
TypeScript

import { describe, expect, it } from "vitest"
import { getContainerTags } from "./tools"
describe("getContainerTags", () => {
it("defaults to the default project when no config is provided", () => {
expect(getContainerTags()).toEqual(["sm_project_default"])
})
it("converts projectId into a project container tag", () => {
expect(getContainerTags({ projectId: "abc" })).toEqual(["sm_project_abc"])
})
it("uses explicit container tags", () => {
expect(getContainerTags({ containerTags: ["tag-a", "tag-b"] })).toEqual([
"tag-a",
"tag-b",
])
})
it("rejects config with both projectId and containerTags", () => {
expect(() =>
getContainerTags({
projectId: "abc",
containerTags: ["tag-a"],
}),
).toThrow("either projectId or containerTags")
})
})