From 84d9b388734166476055bd5c185a09df48d9d1fa Mon Sep 17 00:00:00 2001 From: James Long Date: Sun, 22 Mar 2026 23:35:17 -0400 Subject: [PATCH] fix(core): fix file watcher test (#18698) --- packages/opencode/test/file/watcher.test.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/opencode/test/file/watcher.test.ts b/packages/opencode/test/file/watcher.test.ts index 8cbd478cb..6658634e5 100644 --- a/packages/opencode/test/file/watcher.test.ts +++ b/packages/opencode/test/file/watcher.test.ts @@ -177,13 +177,17 @@ describeWatcher("FileWatcher", () => { await withWatcher(tmp.path, Effect.void) // Now write a file — no watcher should be listening - await Effect.runPromise( - noUpdate( - tmp.path, - (e) => e.file === file, - Effect.promise(() => fs.writeFile(file, "gone")), - ), - ) + await Instance.provide({ + directory: tmp.path, + fn: () => + Effect.runPromise( + noUpdate( + tmp.path, + (e) => e.file === file, + Effect.promise(() => fs.writeFile(file, "gone")), + ), + ), + }) }) test("ignores .git/index changes", async () => {