test(hooks): remove unsafe test assertions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -19,9 +19,9 @@ describe("no-hephaestus-non-gpt hook", () => {
|
||||
test("shows toast on every chat.message when hephaestus uses non-gpt model", async () => {
|
||||
// given - hephaestus with claude model
|
||||
const showToast = spyOn({ fn: async (_input: unknown) => ({}) }, "fn")
|
||||
const hook = createNoHephaestusNonGptHook({
|
||||
const hook = createNoHephaestusNonGptHook(testCoerce({
|
||||
client: { tui: { showToast } },
|
||||
} as any)
|
||||
}))
|
||||
|
||||
const output1 = createOutput()
|
||||
const output2 = createOutput()
|
||||
@@ -54,9 +54,9 @@ describe("no-hephaestus-non-gpt hook", () => {
|
||||
test("shows warning and does not switch agent when allow_non_gpt_model is enabled", async () => {
|
||||
// given - hephaestus with claude model and opt-out enabled
|
||||
const showToast = spyOn({ fn: async (_input: unknown) => ({}) }, "fn")
|
||||
const hook = createNoHephaestusNonGptHook({
|
||||
const hook = createNoHephaestusNonGptHook(testCoerce({
|
||||
client: { tui: { showToast } },
|
||||
} as any, {
|
||||
}), {
|
||||
allowNonGptModel: true,
|
||||
})
|
||||
|
||||
@@ -83,9 +83,9 @@ describe("no-hephaestus-non-gpt hook", () => {
|
||||
test("does not show toast when hephaestus uses gpt model", async () => {
|
||||
// given - hephaestus with gpt model
|
||||
const showToast = spyOn({ fn: async (_input: unknown) => ({}) }, "fn")
|
||||
const hook = createNoHephaestusNonGptHook({
|
||||
const hook = createNoHephaestusNonGptHook(testCoerce({
|
||||
client: { tui: { showToast } },
|
||||
} as any)
|
||||
}))
|
||||
|
||||
const output = createOutput()
|
||||
|
||||
@@ -104,9 +104,9 @@ describe("no-hephaestus-non-gpt hook", () => {
|
||||
test("does not show toast for non-hephaestus agent", async () => {
|
||||
// given - sisyphus with claude model (non-gpt)
|
||||
const showToast = spyOn({ fn: async (_input: unknown) => ({}) }, "fn")
|
||||
const hook = createNoHephaestusNonGptHook({
|
||||
const hook = createNoHephaestusNonGptHook(testCoerce({
|
||||
client: { tui: { showToast } },
|
||||
} as any)
|
||||
}))
|
||||
|
||||
const output = createOutput()
|
||||
|
||||
@@ -127,9 +127,9 @@ describe("no-hephaestus-non-gpt hook", () => {
|
||||
_resetForTesting()
|
||||
updateSessionAgent("ses_4", HEPHAESTUS_DISPLAY)
|
||||
const showToast = spyOn({ fn: async (_input: unknown) => ({}) }, "fn")
|
||||
const hook = createNoHephaestusNonGptHook({
|
||||
const hook = createNoHephaestusNonGptHook(testCoerce({
|
||||
client: { tui: { showToast } },
|
||||
} as any)
|
||||
}))
|
||||
|
||||
const output = createOutput()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user