single-staged-file
worktree
one baseline commit + a single staged README
Description
Minimal "ready to commit" state. A single baseline commit on `main` plus one staged file (`README.md`). No unstaged or untracked files. Useful for testing: - `coco commit` (any flavor — has a staged diff to summarize) - any flow that asserts "there is staged content to commit" - smoke tests that just need a valid commit-ready repo
Contracts
- main has 1 commit
- exactly 1 staged file (README.md)
- no unstaged or untracked files
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('single-staged-file') npx git-scenarios create single-staged-file import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('single-staged-file', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* bdc267e (HEAD -> main) chore: initial commit