fix(watcher): stabilize daemon readiness and tests

This commit is contained in:
2026-05-19 23:58:18 -04:00
parent 0aa44bedc4
commit b7e421483d
3 changed files with 17 additions and 14 deletions

View File

@@ -13,15 +13,15 @@ describe("cli daemon lifecycle", () => {
const env = { ...process.env };
let cleanup: () => void;
before(() => {
before(async () => {
cleanup = setTestSocket(env);
// Stop any stale daemon on this socket before tests run.
stopTestDaemon(env);
await stopTestDaemon(env);
});
after(() => {
after(async () => {
// Tear down daemon and clean up socket after all tests.
stopTestDaemon(env);
await stopTestDaemon(env);
cleanup();
});