test: add tests for council config schema, prompt content, and config injection
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, it } from "bun:test"
|
||||
import { createAthenaAgent } from "./agent"
|
||||
|
||||
describe("Athena prompt config injection placeholders", () => {
|
||||
const athenaConfig = createAthenaAgent("anthropic/claude-opus-4-6")
|
||||
|
||||
describe("#given the Athena agent prompt", () => {
|
||||
describe("#when checking for runtime injection placeholders", () => {
|
||||
it("#then contains RETRY_ON_FAIL placeholder", () => {
|
||||
expect(athenaConfig.prompt).toContain("{RETRY_ON_FAIL}")
|
||||
})
|
||||
|
||||
it("#then contains STUCK_THRESHOLD_SECONDS placeholder", () => {
|
||||
expect(athenaConfig.prompt).toContain("{STUCK_THRESHOLD_SECONDS}")
|
||||
})
|
||||
|
||||
it("#then contains quorum reference", () => {
|
||||
expect(athenaConfig.prompt).toContain("quorum")
|
||||
})
|
||||
|
||||
it("#then contains timeout reference with 30000", () => {
|
||||
expect(athenaConfig.prompt).toContain("30000")
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,24 @@
|
||||
import { describe, expect, it } from "bun:test"
|
||||
import { COUNCIL_MEMBER_PROMPT } from "./council-member-agent"
|
||||
|
||||
describe("COUNCIL_MEMBER_PROMPT", () => {
|
||||
describe("#given the prompt constant", () => {
|
||||
describe("#when checking for required tag instructions", () => {
|
||||
it("#then contains COUNCIL_MEMBER_RESPONSE tag name", () => {
|
||||
expect(COUNCIL_MEMBER_PROMPT).toContain("COUNCIL_MEMBER_RESPONSE")
|
||||
})
|
||||
|
||||
it("#then contains Response Format section header", () => {
|
||||
expect(COUNCIL_MEMBER_PROMPT).toContain("Response Format")
|
||||
})
|
||||
|
||||
it("#then contains opening tag example", () => {
|
||||
expect(COUNCIL_MEMBER_PROMPT).toContain("<COUNCIL_MEMBER_RESPONSE>")
|
||||
})
|
||||
|
||||
it("#then contains closing tag example", () => {
|
||||
expect(COUNCIL_MEMBER_PROMPT).toContain("</COUNCIL_MEMBER_RESPONSE>")
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user