mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
- Rename packages/opencode → packages/tfcode (directory only) - Rename bin/opencode → bin/tfcode (CLI binary) - Rename .opencode → .tfcode (config directory) - Update package.json name and bin field - Update config directory path references (.tfcode) - Keep internal code references as 'opencode' for easy upstream sync - Keep @opencode-ai/* workspace package names This minimal branding approach allows clean merges from upstream opencode repository while providing tfcode branding for users.
27 lines
992 B
TypeScript
27 lines
992 B
TypeScript
import { describe, expect, test } from "bun:test"
|
|
import stripAnsi from "strip-ansi"
|
|
|
|
import { formatAccountLabel, formatOrgLine } from "../../src/cli/cmd/account"
|
|
|
|
describe("console account display", () => {
|
|
test("includes the account url in account labels", () => {
|
|
expect(stripAnsi(formatAccountLabel({ email: "one@example.com", url: "https://one.example.com" }, false))).toBe(
|
|
"one@example.com https://one.example.com",
|
|
)
|
|
})
|
|
|
|
test("includes the active marker in account labels", () => {
|
|
expect(stripAnsi(formatAccountLabel({ email: "one@example.com", url: "https://one.example.com" }, true))).toBe(
|
|
"one@example.com https://one.example.com (active)",
|
|
)
|
|
})
|
|
|
|
test("includes the account url in org rows", () => {
|
|
expect(
|
|
stripAnsi(
|
|
formatOrgLine({ email: "one@example.com", url: "https://one.example.com" }, { id: "org-1", name: "One" }, true),
|
|
),
|
|
).toBe(" ● One one@example.com https://one.example.com org-1")
|
|
})
|
|
})
|