Add versioned streaming indicators and share chart calculations
This commit is contained in:
parent
7827220b9b
commit
cca5d71e6e
20 changed files with 1470 additions and 331 deletions
|
|
@ -126,6 +126,22 @@ describe('shared library boundaries', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it('chart indicator adapters can be bundled for browsers without native or server dependencies', async () => {
|
||||
const file = join(root, 'apps/stock/web-app/src/features/charts/utils/indicators.ts');
|
||||
expect(runtimeImports(file).sort()).toEqual([
|
||||
'@stock-bot/calculations/indicators',
|
||||
'@stock-bot/calculations/market-data',
|
||||
'@stock-bot/invariants',
|
||||
]);
|
||||
const bundle = await Bun.build({ entrypoints: [file], target: 'browser', write: false });
|
||||
expect(bundle.success).toBe(true);
|
||||
const code = await bundle.outputs[0]?.text();
|
||||
expect(code).toBeDefined();
|
||||
expect(code).not.toContain('engine.node');
|
||||
expect(code).not.toContain('PostgresClient');
|
||||
expect(code).not.toContain('legacy/technical-indicators');
|
||||
});
|
||||
|
||||
it('library source and tests contain no disabled or backup copies', () => {
|
||||
const files = [...new Bun.Glob('**/*').scanSync({ cwd: join(root, 'libs') })];
|
||||
const backups = files.filter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue