Skip to content

Commit f003231

Browse files
committed
fix: use load() helper in order tests for proper Effect service resolution
The new order tests called Agent.list() and Agent.get() directly, which return Effect objects rather than resolved values. All existing tests use the load() helper which properly provides the Effect service layer via Effect.runPromise. This fixes the unit test failures on both linux and windows CI.
1 parent ad7a9e3 commit f003231

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/opencode/test/agent/agent.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ test("Agent.list respects order field as primary sort key", async () => {
431431
await Instance.provide({
432432
directory: tmp.path,
433433
fn: async () => {
434-
const names = (await Agent.list()).map((a) => a.name)
434+
const names = (await load(tmp.path, (svc) => svc.list())).map((a) => a.name)
435435
// order overrides default_agent: plan is first because order:1, not because it's default
436436
expect(names[0]).toBe("plan")
437437
expect(names[1]).toBe("explore")
@@ -451,7 +451,7 @@ test("agent order can be set from config", async () => {
451451
await Instance.provide({
452452
directory: tmp.path,
453453
fn: async () => {
454-
const build = await Agent.get("build")
454+
const build = await load(tmp.path, (svc) => svc.get("build"))
455455
expect(build?.order).toBe(10)
456456
},
457457
})

0 commit comments

Comments
 (0)