fix(test): stabilize post-compact reminder assertion

This commit is contained in:
777genius 2026-04-20 21:23:38 +03:00
parent d71090ef1e
commit 66409ca56b

View file

@ -459,14 +459,11 @@ describe('TeamProvisioningService post-compact lifecycle', () => {
result: {}, result: {},
}); });
// Allow the void async injection to run await vi.waitFor(() => {
await new Promise((r) => setTimeout(r, 50)); expect(run.postCompactReminderInFlight).toBe(true);
expect(run.pendingPostCompactReminder).toBe(false);
// A follow-up reminder was triggered: in-flight again, pending consumed expect(writeSpy).toHaveBeenCalledTimes(1);
expect(run.postCompactReminderInFlight).toBe(true); });
expect(run.pendingPostCompactReminder).toBe(false);
// Verify a second write happened (the follow-up reminder)
expect(writeSpy).toHaveBeenCalledTimes(1);
await svc.cancelProvisioning(runId); await svc.cancelProvisioning(runId);
}); });