refactor(core): convert opencode tests to nodes (#34453)

This commit is contained in:
James Long
2026-06-29 12:56:44 -04:00
committed by GitHub
parent b10d617c80
commit bc5ce5eab1
36 changed files with 112 additions and 106 deletions
@@ -1,8 +1,9 @@
import { afterEach, expect } from "bun:test"
import { createServer, type Server } from "node:http"
import { streamText } from "ai"
import { Effect, Layer } from "effect"
import { LayerNode } from "@opencode-ai/core/effect/layer-node"
import { CrossSpawnSpawner } from "@opencode-ai/core/cross-spawn-spawner"
import { Effect } from "effect"
import { ProviderV2 } from "@opencode-ai/core/provider"
import { ModelV2 } from "@opencode-ai/core/model"
import { disposeAllInstances, provideTmpdirInstance } from "../fixture/fixture"
@@ -17,9 +18,7 @@ afterEach(async () => {
await disposeAllInstances()
})
const it = testEffect(
Layer.mergeAll(Provider.defaultLayer, Env.defaultLayer, Plugin.defaultLayer, CrossSpawnSpawner.defaultLayer),
)
const it = testEffect(LayerNode.compile(LayerNode.group([Provider.node, Env.node, Plugin.node, CrossSpawnSpawner.node])))
it.live("headerTimeout does not abort delayed SSE body after headers arrive", () =>
Effect.gen(function* () {