feat(research): select and reuse frozen datasets in workbench
This commit is contained in:
parent
6a67ae8683
commit
b106c1ca85
29 changed files with 2295 additions and 426 deletions
|
|
@ -63,6 +63,23 @@ describe('shared backtest request contract', () => {
|
|||
expect(runnerParser).toBe(parseBacktestRequest);
|
||||
});
|
||||
|
||||
test('historical provider selection is retained as execution configuration', () => {
|
||||
for (const dataSource of ['auto', 'questdb', 'eod'] as const) {
|
||||
const snapshot = backtestRequestFromDefinition({
|
||||
...definition,
|
||||
config: { ...definition.config, dataSource },
|
||||
});
|
||||
expect(snapshot.dataSource).toBe(dataSource);
|
||||
expect(parseBacktestRequest(snapshot).dataSource).toBe(dataSource);
|
||||
expect(normalizeBacktestStrategyConfig(snapshot.config ?? {}).parameters).toEqual(
|
||||
definition.config
|
||||
);
|
||||
}
|
||||
expect(() =>
|
||||
backtestRequestFromDefinition({ ...definition, config: { dataSource: 'unknown' } })
|
||||
).toThrow();
|
||||
});
|
||||
|
||||
test('definition snapshots and direct requests share defaults without mutating their inputs', () => {
|
||||
const input = structuredClone(request);
|
||||
const parsed = parseBacktestRequest(input);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue