mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-11 15:22:34 +00:00
Merge pull request #2497 from PR0M3TH3AN/agents/daily/ci-health-agent-2026-02-14-5523154352363649208
chore(ai): CI health fixes (flaky tests)
This commit is contained in:
3 files changed
+63
-34
No files matched your search
@@ -127,14 +127,16 @@ test("EngagementController", async (t) => {
|
||||
const eventId = "test-event-id";
|
||||
mockNostrClient.rebroadcastEvent.mock.mockImplementation(async () => ({ throttled: true, cooldown: { remainingMs: 5000 } }));
|
||||
|
||||
global.window = { setTimeout: t.mock.fn() };
|
||||
try {
|
||||
global.window = { setTimeout: t.mock.fn() };
|
||||
|
||||
await controller.handleEnsurePresenceAction({ eventId });
|
||||
await controller.handleEnsurePresenceAction({ eventId });
|
||||
|
||||
assert.equal(mockShowStatus.mock.calls.length, 1);
|
||||
assert.match(mockShowStatus.mock.calls[0].arguments[0], /Rebroadcast is cooling down/);
|
||||
|
||||
delete global.window;
|
||||
assert.equal(mockShowStatus.mock.calls.length, 1);
|
||||
assert.match(mockShowStatus.mock.calls[0].arguments[0], /Rebroadcast is cooling down/);
|
||||
} finally {
|
||||
delete global.window;
|
||||
}
|
||||
});
|
||||
|
||||
await t.test("handleEnsurePresenceAction - should show success on successful rebroadcast", async () => {
|
||||
|
||||
Reference in new issue
Block a user