Skip to content

Commit 76ee624

Browse files
committed
Fix flaky watcher test by letting fs.watch initialize before writing
1 parent 2cfcf3f commit 76ee624

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/dev.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ describe("Dev Server", () => {
403403

404404
const watchers = setupWatchers(rebuild, [TEST_DIRS.watchDir]);
405405

406+
// Let fs.watch initialize before writing (it's async)
407+
await Bun.sleep(100);
408+
406409
// Write a markdown file to trigger rebuild
407410
writeFileSync(join(TEST_DIRS.watchDir, "test-post.md"), "# Test");
408411

0 commit comments

Comments
 (0)