import { describe, expect, it } from 'vitest'; import { readFileSync } from 'node:fs'; describe('Coolify and Nixpacks deployment config', () => { it('defines a production start script that binds to all interfaces and PORT', () => { const packageJson = JSON.parse(readFileSync('package.json', 'utf8')); expect(packageJson.scripts.start).toContain('astro preview'); expect(packageJson.scripts.start).toContain('--host 0.0.0.0'); expect(packageJson.scripts.start).toContain('${PORT:-4321}'); }); it('pins Nixpacks install, build, and start commands for Coolify', () => { const nixpacks = readFileSync('nixpacks.toml', 'utf8'); expect(nixpacks).toContain('npm ci'); expect(nixpacks).toContain('npm run build'); expect(nixpacks).toContain('npm run start'); }); });