mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
Thin @supermemory/ai-sdk package now mirrors the canonical 7-tool surface with updated tests. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
786 B
TypeScript
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")
|
|
})
|
|
})
|