actions.test.ts 406 B

1234567891011
  1. import { expect, test } from "bun:test"
  2. import { matches } from "../src/frontend/actions"
  3. test("matches literal screen text", () => {
  4. const harness = { screen: () => "OpenCode [ready].*" }
  5. expect(matches(harness, "OpenCode")).toBe(true)
  6. expect(matches(harness, "[ready].*")).toBe(true)
  7. expect(matches(harness, "OpenCode.*ready")).toBe(false)
  8. expect(matches(harness, "opencode")).toBe(false)
  9. })