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:
YeonGyu-Kim
2026-05-12 14:22:05 +09:00
parent 11b3638493
commit 23211159c9
37 changed files with 242 additions and 232 deletions
@@ -11,13 +11,13 @@ type StartLoopCall = {
type CancelLoopCall = { sessionID: string }
function createMockPluginInput() {
return {
return testCoerce({
client: {
tui: {
showToast: async () => {},
},
},
} as any
})
}
function createMockRalphLoop(startLoopCalls: StartLoopCall[], cancelLoopCalls: CancelLoopCall[] = []) {
@@ -22,7 +22,7 @@ describe("keyword-detector hyperplan-ultrawork combo", () => {
function createMockPluginInput(options: { toastCalls?: string[] } = {}) {
const toastCalls = options.toastCalls ?? []
return {
return testCoerce<PluginInput>({
client: {
tui: {
showToast: async (opts: { body: { title: string } }) => {
@@ -30,7 +30,7 @@ describe("keyword-detector hyperplan-ultrawork combo", () => {
},
},
},
} as unknown as PluginInput
})
}
test("should inject combo message when user types 'hpp ulw' (forward order)", async () => {
+4 -4
View File
@@ -881,13 +881,13 @@ describe("keyword-detector team mode", () => {
})
function createMockPluginInput() {
return {
return testCoerce<PluginInput>({
client: {
tui: {
showToast: async () => {},
},
},
} as unknown as PluginInput
})
}
test("should inject team-mode message when user types 'team mode'", async () => {
@@ -1063,7 +1063,7 @@ describe("keyword-detector disabled_keywords config", () => {
function createMockPluginInput(options: { toastCalls?: string[] } = {}) {
const toastCalls = options.toastCalls ?? []
return {
return testCoerce<PluginInput>({
client: {
tui: {
showToast: async (opts: { body: { title: string } }) => {
@@ -1071,7 +1071,7 @@ describe("keyword-detector disabled_keywords config", () => {
},
},
},
} as unknown as PluginInput
})
}
test("should NOT inject search-mode when disabled_keywords includes 'search'", async () => {
@@ -11,7 +11,7 @@ type StartLoopCall = {
}
function createMockPluginInput(toastCalls: string[] = []) {
return {
return testCoerce<PluginInput>({
client: {
tui: {
showToast: async (opts: { body: { title: string } }) => {
@@ -19,7 +19,7 @@ function createMockPluginInput(toastCalls: string[] = []) {
},
},
},
} as unknown as PluginInput
})
}
function createMockRalphLoop(startLoopCalls: StartLoopCall[]) {
@@ -3,7 +3,7 @@ import { createKeywordDetectorHook } from "./index"
import { _resetForTesting, setMainSession } from "../../features/claude-code-session-state"
function createMockPluginInput(toastMessages: string[]) {
return {
return testCoerce({
client: {
tui: {
showToast: async (opts: { body: { message: string } }) => {
@@ -11,7 +11,7 @@ function createMockPluginInput(toastMessages: string[]) {
},
},
},
} as any
})
}
describe("keyword-detector ultrawork runtime variant gating", () => {