chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:47:58 +08:00
commit b16403ea71
789 changed files with 115226 additions and 0 deletions
@@ -0,0 +1,35 @@
import { expect } from 'vitest'
import { sandboxTest } from '../../setup.js'
import {
cleanupBaseDir,
createBaseDir,
createRepoWithCommit,
startGitDaemon,
} from './helpers.js'
sandboxTest('git clone fetches repo', async ({ sandbox }) => {
const baseDir = await createBaseDir(sandbox)
try {
const repoPath = await createRepoWithCommit(sandbox, baseDir)
const daemon = await startGitDaemon(sandbox, baseDir)
const clonePath = `${baseDir}/clone`
try {
await sandbox.git.remoteAdd(repoPath, 'origin', daemon.remoteUrl)
await sandbox.git.push(repoPath, {
remote: 'origin',
branch: 'main',
})
await sandbox.git.clone(daemon.remoteUrl, { path: clonePath })
const contents = await sandbox.files.read(`${clonePath}/README.md`)
expect(contents).toContain('hello')
} finally {
await daemon.handle.kill()
}
} finally {
await cleanupBaseDir(sandbox, baseDir)
}
})