Compose-ready workspace: packages/zappier (rate card, portal, Stripe), packages/verae-zapier-middleware (timestamp + NATS), packages/verae-zapier (CLI app), vendor/zapier-platform, and research/zapier vendor corpus. Gate 0 structure checks pass. Product code and research are not yet wired.
21 lines
839 B
TypeScript
21 lines
839 B
TypeScript
import fs from 'fs';
|
|
import path from 'path';
|
|
import { PROJECT_ROOT } from '../src/paths';
|
|
|
|
// The server must work from any working directory (systemd, Docker, cron,
|
|
// `node dist/index.js` launched from elsewhere), so every runtime path is
|
|
// resolved from PROJECT_ROOT rather than process.cwd().
|
|
describe('PROJECT_ROOT', () => {
|
|
it('points at the project root regardless of cwd', () => {
|
|
expect(path.isAbsolute(PROJECT_ROOT)).toBe(true);
|
|
expect(fs.existsSync(path.join(PROJECT_ROOT, 'package.json'))).toBe(true);
|
|
});
|
|
|
|
it('resolves the OpenAPI spec served at /docs', () => {
|
|
expect(fs.existsSync(path.join(PROJECT_ROOT, 'openapi.yaml'))).toBe(true);
|
|
});
|
|
|
|
it('resolves the admin static assets served at /admin', () => {
|
|
expect(fs.existsSync(path.join(PROJECT_ROOT, 'admin', 'index.html'))).toBe(true);
|
|
});
|
|
});
|