mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-14 00:23:24 +00:00
test(core): narrow effect flock harness (#41837)
This commit is contained in:
parent
14deb6baf7
commit
b4abeb4788
2 changed files with 3 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import fs from "fs/promises"
|
||||
import os from "os"
|
||||
import { Effect } from "effect"
|
||||
import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
|
||||
import { LayerNode } from "@opencode-ai/util/effect/layer-node"
|
||||
import { EffectFlock } from "@opencode-ai/util/effect-flock"
|
||||
import { Global } from "@opencode-ai/util/global"
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ const testGlobal = Global.layerWith({
|
|||
log: os.tmpdir(),
|
||||
})
|
||||
|
||||
const testLayer = AppNodeBuilder.build(EffectFlock.node, [[Global.node, testGlobal]])
|
||||
const testLayer = LayerNode.compile(EffectFlock.node, [[Global.node, testGlobal]])
|
||||
|
||||
async function job() {
|
||||
if (msg.ready) await fs.writeFile(msg.ready, String(process.pid))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import path from "path"
|
|||
import os from "os"
|
||||
import { Cause, Effect, Exit } from "effect"
|
||||
import { testEffect } from "../lib/effect"
|
||||
import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
|
||||
import { LayerNode } from "@opencode-ai/util/effect/layer-node"
|
||||
import { EffectFlock } from "@opencode-ai/util/effect-flock"
|
||||
import { Global } from "@opencode-ai/util/global"
|
||||
|
|
@ -110,7 +109,7 @@ const testGlobal = Global.layerWith({
|
|||
log: os.tmpdir(),
|
||||
})
|
||||
|
||||
const testLayer = AppNodeBuilder.build(EffectFlock.node, [[Global.node, testGlobal]])
|
||||
const testLayer = LayerNode.compile(EffectFlock.node, [[Global.node, testGlobal]])
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue