Normalize instance lifecycle wiring (#25501)
This commit is contained in:
@@ -7,6 +7,7 @@ import { disposeAllInstances, tmpdir } from "../fixture/fixture"
|
||||
import { AppRuntime } from "../../src/effect/app-runtime"
|
||||
import { FileWatcher } from "../../src/file/watcher"
|
||||
import { Instance } from "../../src/project/instance"
|
||||
import { WithInstance } from "../../src/project/with-instance"
|
||||
import { GlobalBus } from "../../src/bus/global"
|
||||
import { Vcs } from "@/project/vcs"
|
||||
|
||||
@@ -18,7 +19,7 @@ const describeVcs = FileWatcher.hasNativeBinding() && !process.env.CI ? describe
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function withVcs(directory: string, body: () => Promise<void>) {
|
||||
return Instance.provide({
|
||||
return WithInstance.provide({
|
||||
directory,
|
||||
fn: async () => {
|
||||
await AppRuntime.runPromise(
|
||||
@@ -36,7 +37,7 @@ async function withVcs(directory: string, body: () => Promise<void>) {
|
||||
}
|
||||
|
||||
function withVcsOnly(directory: string, body: () => Promise<void>) {
|
||||
return Instance.provide({
|
||||
return WithInstance.provide({
|
||||
directory,
|
||||
fn: async () => {
|
||||
await AppRuntime.runPromise(
|
||||
|
||||
Reference in New Issue
Block a user