logging.test.ts 552 B

1234567891011121314
  1. import { describe, expect, test } from "bun:test"
  2. import path from "path"
  3. import { Global } from "@opencode-ai/util/global"
  4. import { Logging } from "@opencode-ai/util/observability/logging"
  5. describe("Logging", () => {
  6. test("uses a local-specific log file for local installs", () => {
  7. expect(Logging.file(true, "local")).toBe(path.join(Global.Path.log, "opencode-local.log"))
  8. })
  9. test("keeps non-local installs on the default log file", () => {
  10. expect(Logging.file(false, "next")).toBe(path.join(Global.Path.log, "opencode.log"))
  11. })
  12. })