mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-20 23:23:26 +01:00
/setup-deploy stated that Vercel always deploys on push, which is false for CLI-only projects with no Git integration, and its nothing-detected path did not say why such a project is invisible to detection. Qualify the Vercel trigger (ask for and record the CLI deploy command otherwise) and note that `vercel link` creates .vercel/ so a re-run detects the project. Adopts the Vercel accuracy part of #2992 (rewritten on current main); the third-party bring-up tool pointer is not adopted. Co-authored-by: mikehasa <91774998+mikehasa@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
27 lines
1.3 KiB
TypeScript
27 lines
1.3 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
|
|
const SKILL = fs.readFileSync(path.resolve(import.meta.dir, '..', 'setup-deploy', 'SKILL.md'), 'utf-8');
|
|
|
|
function section(heading: string, next: string): string {
|
|
const start = SKILL.indexOf(heading);
|
|
expect(start).toBeGreaterThanOrEqual(0);
|
|
return SKILL.slice(start, SKILL.indexOf(next, start + heading.length));
|
|
}
|
|
|
|
describe('setup-deploy does not assume Vercel deploys on push', () => {
|
|
test('auto-deploy is conditional on a Git-connected Vercel project', () => {
|
|
const vercel = section('#### Vercel', '#### Netlify');
|
|
expect(vercel).toContain('only when the Vercel project is connected to this Git repository');
|
|
expect(vercel).toContain('For a CLI-only project, ask how production deploys run and record that command as the deploy trigger');
|
|
});
|
|
|
|
test('the nothing-detected path explains how a CLI-only Vercel project becomes detectable', () => {
|
|
const manual = section('#### Custom / Manual', '1. **How are deploys triggered?**');
|
|
expect(manual).toContain('deployed only with the Vercel CLI has no `vercel.json` or `.vercel/`');
|
|
expect(manual).toContain('`vercel link` creates `.vercel/`');
|
|
expect(SKILL).not.toMatch(/GoLive/i);
|
|
});
|
|
});
|