Files
gstack/test/setup-deploy-not-deployed.test.ts
T
50d020ad9d v1.91.85.0 fix(cso,deploy): /cso on Windows Git 2.56 and macOS Docker, zsh-safe loops, honest deploy stops (Wave 9 Lane D) (#3134)
/cso sets GIT_CONFIG_GLOBAL=/dev/null on every platform (Git for Windows 2.56
rejects NUL), shared by childEnvironment and the eval and producer Git
environments, with a Windows-safe test that `git config --global --list` is
empty. On macOS the local Docker socket resolves without opening it when Bun's
realpathSync throws EOPNOTSUPP; Linux admission and the local-Unix-only rule
are unchanged. /test-audit and /ship loop over file lists zsh does not
word-split, with a static test against `for x in $VAR` in generated bash.
/setup-deploy stops and writes nothing when nothing is deployed yet;
/land-and-deploy runs a recorded command trigger only with explicit approval
before claiming revision proof. TODOS.md records the open P2/P3 bugs by area,
the Wave 9 parked items and the feature themes.

Closes #3082. Adopts #3094, #3095, #3096 and #3109.

Co-authored-by: marcode <244097767+vilano93@users.noreply.github.com>
Co-authored-by: Nathan <196341+nathanshox@users.noreply.github.com>
Co-authored-by: mikehasa <91774998+mikehasa@users.noreply.github.com>
Co-authored-by: Andrey <95643518+Alfabit7@users.noreply.github.com>
2026-10-11 15:43:33 +00:00

35 lines
1.5 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);
const end = SKILL.indexOf(next, start + heading.length);
expect(end).toBeGreaterThan(start);
return SKILL.slice(start, end);
}
describe('setup-deploy handles a project with nothing live yet', () => {
const question = section('1. **How are deploys triggered?**', "2. **What's the production URL?**");
test('not deployed yet and never deploys are separate answers', () => {
expect(question).toContain('E) Nothing is deployed yet');
expect(question).toContain('F) This project never deploys (library, CLI, tool)');
});
test('nothing deployed yet stops before the URL question and writes nothing', () => {
const onE = question.slice(question.indexOf('On E,'));
expect(onE).toContain('stop here and write nothing');
expect(onE).toContain('no production URL and no deploy trigger to record');
expect(onE).toContain('re-run `/setup-deploy` after the first production deploy exists');
});
test('a project that never deploys still gets the none configuration', () => {
expect(question).toContain('On F, Step 4 writes the `none` configuration');
expect(SKILL).toContain('If the project does not deploy, set platform/URL/workflow/status/health/trigger to `none`');
});
});