Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

fix: Initialize ConflictResolver with proper dependencies in coordination-system.test.ts

rUvb065c84345f4
diff --git a/tests/test.utils.ts b/tests/test.utils.ts
index e86677b1b0..79b48080d6 100644
--- a/tests/test.utils.ts
+++ b/tests/test.utils.ts
@@ -9,6 +9,15 @@ export const mockLogger = {
trace: jest.fn()
};
+// Mock event bus utilities
+export const mockEventBus = {
+ emit: jest.fn(),
+ on: jest.fn(),
+ off: jest.fn(),
+ once: jest.fn(),
+ removeAllListeners: jest.fn()
+};
+
// Mock coordination system utilities
export const mockCoordinationSystem = {
initialize: jest.fn(),
diff --git a/tests/unit/coordination/coordination-system.test.ts b/tests/unit/coordination/coordination-system.test.ts
index c0743fb222..b091f525d1 100644
--- a/tests/unit/coordination/coordination-system.test.ts
+++ b/tests/unit/coordination/coordination-system.test.ts
@@ -3,10 +3,8 @@
* Tests deadlock detection, task scheduling, and resource management
*/
-import { describe, it, beforeEach, afterEach } from "../../test.utils";
+import { describe, it, beforeEach, afterEach, mockLogger, mockEventBus, FakeTime, spy, stub } from "../../test.utils";
import { expect } from "@jest/globals";
-// FakeTime equivalent available in test.utils.ts
-import { spy, stub } from "../../test.utils";
import { CoordinationManager } from '../../../src/coordination/manager.ts';
import { TaskScheduler } from '../../../src/coordination/scheduler.ts';
@@ -48,10 +46,10 @@ describe('Coordination System - Comprehensive Tests', () => {
retryAttempts: 3,
});
- conflictResolver = new ConflictResolver({
- enableConflictDetection: true,
- resolutionStrategy: 'priority',
- });
+ conflictResolver = new ConflictResolver(
+ mockLogger,
+ mockEventBus
+ );
coordinationManager = new CoordinationManager({
scheduler,