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
+2 -1
View File
@@ -2,6 +2,7 @@ import path from "node:path"
import { pathToFileURL } from "node:url"
import { expect, mock, beforeEach } from "bun:test"
import { ListRootsRequestSchema, ToolListChangedNotificationSchema } from "@modelcontextprotocol/sdk/types.js"
import { LayerNode } from "@opencode-ai/core/effect/layer-node"
import { Cause, Effect, Exit } from "effect"
import type { MCP as MCPNS } from "../../src/mcp/index"
import { testEffect } from "../lib/effect"
@@ -275,7 +276,7 @@ beforeEach(() => {
const { MCP } = await import("../../src/mcp/index")
const { McpOAuthCallback } = await import("../../src/mcp/oauth-callback")
const it = testEffect(MCP.defaultLayer)
const it = testEffect(LayerNode.compile(MCP.node))
function statusName(status: Record<string, MCPNS.Status> | MCPNS.Status, server: string) {
if ("status" in status) return status.status