fix(test): stabilize post-compact reminder assertion
This commit is contained in:
parent
d71090ef1e
commit
66409ca56b
1 changed files with 5 additions and 8 deletions
|
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue