test(tools): 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:
@@ -63,7 +63,7 @@ describe("metadata model unification", () => {
|
||||
load_skills: [], run_in_background: true, subagent_type: "explore",
|
||||
}
|
||||
|
||||
await executeBackgroundTask(args, ctx, {
|
||||
await executeBackgroundTask(args, ctx, testCoerce({
|
||||
manager: {
|
||||
launch: async () => ({
|
||||
id: "bg_1", description: "test", agent: "explore",
|
||||
@@ -71,7 +71,7 @@ describe("metadata model unification", () => {
|
||||
}),
|
||||
getTask: () => undefined,
|
||||
},
|
||||
} as any, parentContext, "explore", MODEL, undefined)
|
||||
}), parentContext, "explore", MODEL, undefined)
|
||||
|
||||
const meta = ctx.captured.find((m: any) => m.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -92,7 +92,7 @@ describe("metadata model unification", () => {
|
||||
}
|
||||
await executeUnstableAgentTask(
|
||||
args, ctx,
|
||||
{
|
||||
testCoerce({
|
||||
manager: {
|
||||
launch: async () => launchedTask,
|
||||
getTask: () => launchedTask,
|
||||
@@ -109,7 +109,7 @@ describe("metadata model unification", () => {
|
||||
},
|
||||
},
|
||||
syncPollTimeoutMs: 100,
|
||||
} as any,
|
||||
}),
|
||||
parentContext, "explore", MODEL, undefined, "anthropic/claude-sonnet-4-6",
|
||||
)
|
||||
|
||||
@@ -126,14 +126,14 @@ describe("metadata model unification", () => {
|
||||
load_skills: [], run_in_background: true, task_id: "ses_resumed",
|
||||
}
|
||||
|
||||
await executeBackgroundContinuation(args, ctx, {
|
||||
await executeBackgroundContinuation(args, ctx, testCoerce({
|
||||
manager: {
|
||||
resume: async () => ({
|
||||
id: "bg_2", description: "continue", agent: "explore",
|
||||
status: "running", sessionId: "ses_resumed", model: MODEL,
|
||||
}),
|
||||
},
|
||||
} as any, parentContext)
|
||||
}), parentContext)
|
||||
|
||||
const meta = ctx.captured.find((m: any) => m.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -153,7 +153,7 @@ describe("metadata model unification", () => {
|
||||
fetchSyncResult: async () => ({ ok: true as const, textContent: "done" }),
|
||||
}
|
||||
|
||||
await executeSyncContinuation(args, ctx, {
|
||||
await executeSyncContinuation(args, ctx, testCoerce({
|
||||
client: {
|
||||
session: {
|
||||
messages: async () => ({
|
||||
@@ -162,7 +162,7 @@ describe("metadata model unification", () => {
|
||||
prompt: async () => ({}),
|
||||
},
|
||||
},
|
||||
} as any, parentContext, deps)
|
||||
}), parentContext, deps)
|
||||
|
||||
const meta = ctx.captured.find((m: any) => m.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -206,7 +206,7 @@ describe("metadata model unification", () => {
|
||||
load_skills: [], run_in_background: true, subagent_type: "explore",
|
||||
}
|
||||
|
||||
await executeBackgroundTask(args, ctx, {
|
||||
await executeBackgroundTask(args, ctx, testCoerce({
|
||||
manager: {
|
||||
launch: async () => ({
|
||||
id: "bg_1", description: "test", agent: "explore",
|
||||
@@ -214,7 +214,7 @@ describe("metadata model unification", () => {
|
||||
}),
|
||||
getTask: () => undefined,
|
||||
},
|
||||
} as any, parentContext, "explore", undefined, undefined)
|
||||
}), parentContext, "explore", undefined, undefined)
|
||||
|
||||
const meta = ctx.captured.find((m: any) => m.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -236,7 +236,7 @@ describe("metadata model unification", () => {
|
||||
|
||||
await executeUnstableAgentTask(
|
||||
args, ctx,
|
||||
{
|
||||
testCoerce({
|
||||
manager: {
|
||||
launch: async () => launchedTask,
|
||||
getTask: () => launchedTask,
|
||||
@@ -253,7 +253,7 @@ describe("metadata model unification", () => {
|
||||
},
|
||||
},
|
||||
syncPollTimeoutMs: 100,
|
||||
} as any,
|
||||
}),
|
||||
parentContext, "explore", undefined, undefined, "anthropic/claude-sonnet-4-6",
|
||||
)
|
||||
|
||||
@@ -270,14 +270,14 @@ describe("metadata model unification", () => {
|
||||
load_skills: [], run_in_background: true, task_id: "ses_resumed",
|
||||
}
|
||||
|
||||
await executeBackgroundContinuation(args, ctx, {
|
||||
await executeBackgroundContinuation(args, ctx, testCoerce({
|
||||
manager: {
|
||||
resume: async () => ({
|
||||
id: "bg_2", description: "continue", agent: "explore",
|
||||
status: "running", sessionId: "ses_resumed",
|
||||
}),
|
||||
},
|
||||
} as any, parentContext)
|
||||
}), parentContext)
|
||||
|
||||
const meta = ctx.captured.find((m: any) => m.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -297,14 +297,14 @@ describe("metadata model unification", () => {
|
||||
fetchSyncResult: async () => ({ ok: true as const, textContent: "done" }),
|
||||
}
|
||||
|
||||
await executeSyncContinuation(args, ctx, {
|
||||
await executeSyncContinuation(args, ctx, testCoerce({
|
||||
client: {
|
||||
session: {
|
||||
messages: async () => ({ data: [] }),
|
||||
prompt: async () => ({}),
|
||||
},
|
||||
},
|
||||
} as any, parentContext, deps)
|
||||
}), parentContext, deps)
|
||||
|
||||
const meta = ctx.captured.find((m: any) => m.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -381,7 +381,7 @@ describe("metadata model unification", () => {
|
||||
category: "visual-engineering", load_skills: [], run_in_background: true, subagent_type: "explore",
|
||||
}
|
||||
|
||||
await executeBackgroundTask(args, ctx, {
|
||||
await executeBackgroundTask(args, ctx, testCoerce({
|
||||
manager: {
|
||||
launch: async () => ({
|
||||
id: "bg_variant", description: "test", agent: "explore",
|
||||
@@ -389,7 +389,7 @@ describe("metadata model unification", () => {
|
||||
}),
|
||||
getTask: () => undefined,
|
||||
},
|
||||
} as any, parentContext, "explore", MODEL_WITH_VARIANT, undefined)
|
||||
}), parentContext, "explore", MODEL_WITH_VARIANT, undefined)
|
||||
|
||||
const meta = ctx.captured.find((metadataEvent: any) => metadataEvent.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -411,7 +411,7 @@ describe("metadata model unification", () => {
|
||||
|
||||
await executeUnstableAgentTask(
|
||||
args, ctx,
|
||||
{
|
||||
testCoerce({
|
||||
manager: {
|
||||
launch: async () => launchedTask,
|
||||
getTask: () => launchedTask,
|
||||
@@ -428,7 +428,7 @@ describe("metadata model unification", () => {
|
||||
},
|
||||
},
|
||||
syncPollTimeoutMs: 100,
|
||||
} as any,
|
||||
}),
|
||||
parentContext, "explore", MODEL_WITH_VARIANT, undefined, "google/gemini-3.1-pro high",
|
||||
)
|
||||
|
||||
@@ -445,14 +445,14 @@ describe("metadata model unification", () => {
|
||||
load_skills: [], run_in_background: true, task_id: "ses_resumed_variant",
|
||||
}
|
||||
|
||||
await executeBackgroundContinuation(args, ctx, {
|
||||
await executeBackgroundContinuation(args, ctx, testCoerce({
|
||||
manager: {
|
||||
resume: async () => ({
|
||||
id: "bg_resume_variant", description: "continue", agent: "explore",
|
||||
status: "running", sessionId: "ses_resumed_variant", model: MODEL_WITH_VARIANT,
|
||||
}),
|
||||
},
|
||||
} as any, parentContext)
|
||||
}), parentContext)
|
||||
|
||||
const meta = ctx.captured.find((metadataEvent: any) => metadataEvent.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
@@ -472,7 +472,7 @@ describe("metadata model unification", () => {
|
||||
fetchSyncResult: async () => ({ ok: true as const, textContent: "done" }),
|
||||
}
|
||||
|
||||
await executeSyncContinuation(args, ctx, {
|
||||
await executeSyncContinuation(args, ctx, testCoerce({
|
||||
client: {
|
||||
session: {
|
||||
messages: async () => ({
|
||||
@@ -481,7 +481,7 @@ describe("metadata model unification", () => {
|
||||
prompt: async () => ({}),
|
||||
},
|
||||
},
|
||||
} as any, parentContext, deps)
|
||||
}), parentContext, deps)
|
||||
|
||||
const meta = ctx.captured.find((metadataEvent: any) => metadataEvent.metadata?.sessionId)
|
||||
expect(meta).toBeDefined()
|
||||
|
||||
Reference in New Issue
Block a user