mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-07 09:18:41 +00:00
fix(opencode): sanitize preview database filenames (#16430)
This commit is contained in:
12
packages/opencode/test/storage/db.test.ts
Normal file
12
packages/opencode/test/storage/db.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { Database } from "../../src/storage/db"
|
||||
|
||||
describe("Database.file", () => {
|
||||
test("uses the shared database for latest", () => {
|
||||
expect(Database.file("latest")).toBe("opencode.db")
|
||||
})
|
||||
|
||||
test("sanitizes preview channels for filenames", () => {
|
||||
expect(Database.file("fix/windows-modified-files-tracking")).toBe("opencode-fix-windows-modified-files-tracking.db")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user