Skip to content

Commit 84d9b38

Browse files
authored
fix(core): fix file watcher test (#18698)
1 parent 8035c34 commit 84d9b38

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

packages/opencode/test/file/watcher.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,17 @@ describeWatcher("FileWatcher", () => {
177177
await withWatcher(tmp.path, Effect.void)
178178

179179
// Now write a file — no watcher should be listening
180-
await Effect.runPromise(
181-
noUpdate(
182-
tmp.path,
183-
(e) => e.file === file,
184-
Effect.promise(() => fs.writeFile(file, "gone")),
185-
),
186-
)
180+
await Instance.provide({
181+
directory: tmp.path,
182+
fn: () =>
183+
Effect.runPromise(
184+
noUpdate(
185+
tmp.path,
186+
(e) => e.file === file,
187+
Effect.promise(() => fs.writeFile(file, "gone")),
188+
),
189+
),
190+
})
187191
})
188192

189193
test("ignores .git/index changes", async () => {

0 commit comments

Comments
 (0)