commit 2 refactor

This commit is contained in:
Boki 2026-10-20 14:35:45 -04:00
parent 588f666943
commit 32e43c9243
310 changed files with 33318 additions and 31189 deletions

View file

@ -0,0 +1,12 @@
import { expect, test } from 'bun:test';
import { createExampleRuntime } from '../../apps/stock/orchestrator/examples/example-runtime';
test('offline examples use the shared DI graph without starting a real-time feed', async () => {
const runtime = await createExampleRuntime();
expect(runtime.container.custom?.StorageService).toBe(runtime.storageService);
expect(runtime.container.custom?.StrategyManager).toBe(runtime.strategyManager);
expect(runtime.container.mongodb).toBeNull();
expect(runtime.container.queueManager).toBeNull();
expect(runtime.modeManager.getConfig()).toBeNull();
expect(() => runtime.modeManager.getTradingEngine()).toThrow('Trading engine not initialized');
});