attach.test.ts 440 B

1234567891011
  1. import { describe, expect, test } from "bun:test"
  2. describe("tui attach", () => {
  3. test("loads the TUI integration lazily", async () => {
  4. const source = await Bun.file(new URL("../../../src/cli/cmd/attach.ts", import.meta.url)).text()
  5. expect(source).toContain('await import("../tui/layer")')
  6. expect(source).toMatch(/await import\(["']@\/plugin\/tui\/runtime["']\)/)
  7. expect(source).not.toContain('import("./app")')
  8. })
  9. })