mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-29 03:44:06 +08:00
20 lines
798 B
TypeScript
20 lines
798 B
TypeScript
import { describe, expect, test } from "bun:test"
|
|
import { shouldRenderApprovalInBody } from "./basic-tool"
|
|
|
|
describe("shouldRenderApprovalInBody", () => {
|
|
test("renders in the body by default when an approval exists", () => {
|
|
expect(shouldRenderApprovalInBody(undefined, true)).toBe(true)
|
|
expect(shouldRenderApprovalInBody("body", true)).toBe(true)
|
|
})
|
|
|
|
test("does not render when there is no approval", () => {
|
|
expect(shouldRenderApprovalInBody("body", false)).toBe(false)
|
|
expect(shouldRenderApprovalInBody(undefined, false)).toBe(false)
|
|
})
|
|
|
|
test("never renders in the body for hidden placement, even with an approval", () => {
|
|
expect(shouldRenderApprovalInBody("hidden", true)).toBe(false)
|
|
expect(shouldRenderApprovalInBody("hidden", false)).toBe(false)
|
|
})
|
|
})
|