Normalize instance lifecycle wiring (#25501)

This commit is contained in:
Kit Langton
2026-05-02 20:39:20 -04:00
committed by GitHub
parent a6464062b7
commit 7d91d3b1ed
71 changed files with 852 additions and 936 deletions
@@ -106,6 +106,7 @@ const { AppRuntime } = await import("../../src/effect/app-runtime")
const { Bus } = await import("../../src/bus")
const { McpOAuthCallback } = await import("../../src/mcp/oauth-callback")
const { Instance } = await import("../../src/project/instance")
const { WithInstance } = await import("../../src/project/with-instance")
const { tmpdir } = await import("../fixture/fixture")
const service = MCP.Service as unknown as Effect.Effect<MCPNS.Interface, never, never>
@@ -127,7 +128,7 @@ test("BrowserOpenFailed event is published when open() throws", async () => {
},
})
await Instance.provide({
await WithInstance.provide({
directory: tmp.path,
fn: async () => {
openShouldFail = true
@@ -183,7 +184,7 @@ test("BrowserOpenFailed event is NOT published when open() succeeds", async () =
},
})
await Instance.provide({
await WithInstance.provide({
directory: tmp.path,
fn: async () => {
openShouldFail = false
@@ -237,7 +238,7 @@ test("open() is called with the authorization URL", async () => {
},
})
await Instance.provide({
await WithInstance.provide({
directory: tmp.path,
fn: async () => {
openShouldFail = false