Skip to content

Commit 3de051e

Browse files
orioltfclaude
andcommitted
docs(spec-15): fix cross-platform fake-git guidance and Out of scope conflict
- Step 1: explicit cross-platform stubs (git + git.cmd) and path.delimiter - Out of scope: remove Windows-contradicting item; clarify shared-helper abstraction is out of scope, not platform coverage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cf5beae commit 3de051e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/plans/15-release-tools-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
## Implementation steps
3838

39-
1. Create `packages/release-tools/scripts/bump-version.test.mjs` with test cases listed in Acceptance criteria. Use the same subprocess-based pattern as `verify-changelog.test.mjs`: create a temp dir via `mkdtempSync`, write fixture files, run the script via `spawnSync` with `cwd: tmpDir` (since `bump-version.mjs` resolves paths from `process.cwd()`). For tests that need a clean or dirty git state, inject a fake `git` binary via PATH manipulation, matching the shell-script approach in `verify-changelog.test.mjs`. Happy-path bump tests also require a `.claude-plugin/marketplace.json` fixture in the temp dir (consumed by `sync-version.mjs`).
39+
1. Create `packages/release-tools/scripts/bump-version.test.mjs` with test cases listed in Acceptance criteria. Use the same subprocess-based pattern as `verify-changelog.test.mjs`: create a temp dir via `mkdtempSync`, write fixture files, run the script via `spawnSync` with `cwd: tmpDir` (since `bump-version.mjs` resolves paths from `process.cwd()`). For tests that need a clean or dirty git state, inject cross-platform fake `git` stubs into the temp dir: a POSIX shell script (`git`) for macOS/Linux and a CMD batch file (`git.cmd`) for Windows. Prepend the temp dir to PATH using `path.delimiter` (not a hard-coded `:`), matching the approach in `verify-changelog.test.mjs` but extended to cover Windows. Happy-path bump tests also require a `.claude-plugin/marketplace.json` fixture in the temp dir (consumed by `sync-version.mjs`).
4040

4141
2. Create `packages/release-tools/scripts/sync-version.test.mjs` with test cases listed in Acceptance criteria.
4242

@@ -86,4 +86,4 @@ pnpm --filter @unic/release-tools test
8686
## Out of scope
8787

8888
- Tests for `tag.mjs` (git-heavy, integration-only)
89-
- Cross-platform fake-binary compatibility beyond what the existing pattern covers
89+
- Extracting a shared reusable fake-binary helper across test files — each test file can inline its own stubs

0 commit comments

Comments
 (0)