T-56: M1.1f — Pass 3 Stage B: pure in-memory listing matcher (EOD venue → listing, IB conid at (instrument, currency), QM/CEO ticker+span Tier 3)
This commit is contained in:
parent
0df989cc07
commit
0baa6f5987
1 changed files with 4 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import { describe, expect, spyOn, test } from 'bun:test';
|
|||
import { getLogger, setLoggerConfig } from '@stock-bot/logger';
|
||||
import type { MongoDBClient, QuestDBClient } from '@stock-bot/services';
|
||||
import { fetchIntraday } from '../../apps/stock/data-ingestion/src/handlers/eod/actions/intraday';
|
||||
import { EOD_CONFIG } from '../../apps/stock/data-ingestion/src/handlers/eod/shared';
|
||||
import type { EodHandler } from '../../apps/stock/data-ingestion/src/handlers/eod/eod.handler';
|
||||
import { RustBacktestAdapter } from '../../apps/stock/orchestrator/src/backtest/RustBacktestAdapter';
|
||||
import {
|
||||
|
|
@ -88,6 +89,8 @@ async function ingest(mongodb: MongoDBClient, bars = intradayResponse()) {
|
|||
expect(url.searchParams.get('to')).toBe(String(end.getTime() / 1000));
|
||||
return Response.json(bars);
|
||||
};
|
||||
const previousToken = EOD_CONFIG.API_TOKEN;
|
||||
EOD_CONFIG.API_TOKEN = 'test-eod-fixture-token';
|
||||
const request = spyOn(globalThis, 'fetch').mockImplementation(
|
||||
Object.assign(fakeFetch, { preconnect: globalThis.fetch.preconnect })
|
||||
);
|
||||
|
|
@ -100,6 +103,7 @@ async function ingest(mongodb: MongoDBClient, bars = intradayResponse()) {
|
|||
});
|
||||
} finally {
|
||||
request.mockRestore();
|
||||
EOD_CONFIG.API_TOKEN = previousToken;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue