feat(core-testing): git-serving fixture helpers
serveFixtureRepo(fixtureDir) copies a fixture into a temp dir, commits
it as a fresh single-commit repo, bare-clones it, and serves it over
`git daemon --export-all` on an ephemeral localhost port (default) or
as a file:// URL (fallback for daemon-less environments). Returns
{ cloneUrl, bareRepoPath, protocol, stop } with idempotent teardown.
Tests exercise a real `git clone` of fixtures/vite-kitchen over both
protocols. New subpath export @repo/core-testing/git — node-only, so
deliberately not on the jsdom root barrel. No new runtime deps: node
built-ins + system git (present in git's exec-path on macOS and the
ubuntu CI image).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
".": "./src/index.ts",
|
||||
"./factory": "./src/factory/index.ts",
|
||||
"./contract": "./src/contract/index.ts",
|
||||
"./git": "./src/git/index.ts",
|
||||
"./instrumentation": "./src/instrumentation/index.ts",
|
||||
"./react": "./src/react/index.ts",
|
||||
"./payload": "./src/payload/index.ts",
|
||||
|
||||
Reference in New Issue
Block a user