commit 2 refactor
This commit is contained in:
parent
588f666943
commit
32e43c9243
310 changed files with 33318 additions and 31189 deletions
12
scripts/test/orchestrator-container.test.ts
Normal file
12
scripts/test/orchestrator-container.test.ts
Normal 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');
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue