refactor(core): convert more opencode tests to nodes (#34464)

This commit is contained in:
James Long
2026-06-29 13:56:28 -04:00
committed by GitHub
parent de185559dd
commit d4fd528152
45 changed files with 209 additions and 203 deletions
@@ -1,5 +1,6 @@
import path from "path"
import { NodeFileSystem } from "@effect/platform-node"
import { LayerNode } from "@opencode-ai/core/effect/layer-node"
import { FSUtil } from "@opencode-ai/core/fs-util"
import { describe, expect, test } from "bun:test"
import { Effect, FileSystem, Layer } from "effect"
@@ -98,7 +99,7 @@ function userMessage(
}
}
const it = testEffect(Layer.mergeAll(FSUtil.defaultLayer, NodeFileSystem.layer))
const it = testEffect(Layer.mergeAll(LayerNode.compile(FSUtil.node), NodeFileSystem.layer))
function remap(root: string, file: string) {
if (file === Global.Path.state) {
@@ -123,7 +124,7 @@ function remappedFs(root: string) {
writeJson: (file, data, mode) => fs.writeJson(remap(root, file), data, mode),
})
}),
).pipe(Layer.provide(FSUtil.defaultLayer))
).pipe(Layer.provide(LayerNode.compile(FSUtil.node)))
}
describe("run variant shared", () => {