feat: Data and run

This commit is contained in:
OpenVelo Agent
2026-07-22 19:56:31 +00:00
parent 3c146a92f9
commit 74e689f25f
17 changed files with 169 additions and 46 deletions
+26
View File
@@ -0,0 +1,26 @@
import { readFileSync } from 'node:fs';
import * as path from 'node:path';
describe('Root dev script orchestration', () => {
it('exposes a `dev` script that runs both backend and frontend workspaces', () => {
const pkg = JSON.parse(
readFileSync(path.join(__dirname, '..', '..', 'package.json'), 'utf8'),
);
expect(typeof pkg.scripts?.dev).toBe('string');
expect(pkg.scripts.dev).toMatch(/workspace\s+backend/);
expect(pkg.scripts.dev).toMatch(/workspace\s+frontend/);
});
it('configures the Angular dev server to proxy /api and /uploads to the Nest backend', () => {
const angularJson = JSON.parse(
readFileSync(
path.join(__dirname, '..', '..', 'frontend', 'angular.json'),
'utf8',
),
);
const serve = angularJson.projects?.hipctf?.architect?.serve;
expect(serve).toBeDefined();
expect(typeof serve.options?.proxyConfig).toBe('string');
expect(serve.options.proxyConfig).toMatch(/proxy/);
});
});