two-commit-feature
branch
baseline scaffold + a single feat commit, clean worktree
Description
Two commits on `main`: a baseline scaffold and one feat commit adding `src/feature.ts`. The worktree is clean. Useful for testing: - `coco changelog` (has one non-baseline commit to summarize) - `coco log` table / JSON output (one feature commit to inspect) - `coco review` against a feature branch - smoke tests that need a `feat:` commit subject to render
Contracts
- main has 2 commits
- commit subjects are "chore: initial commit" and "feat: add feature module"
- src/feature.ts exists
- worktree is clean
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('two-commit-feature') npx git-scenarios create two-commit-feature import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('two-commit-feature', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* 7d4e915 (HEAD -> main) feat: add feature module
* 26c2b1e chore: initial commit