added fixture breadth and regression coverage

This commit is contained in:
2026-04-26 16:21:23 +02:00
parent a83d03bdba
commit e2aec2978b
4 changed files with 149 additions and 1 deletions

View File

@@ -39,3 +39,37 @@ def write_misleading_docs_repo(root: Path) -> Path:
encoding="utf-8",
)
return repo
def write_javascript_typescript_package_repo(root: Path) -> Path:
repo = root / "js-ts-package"
repo.mkdir()
(repo / "README.md").write_text(
"# JS TS Package\n\nExposes browser and API package code.\n",
encoding="utf-8",
)
(repo / "package.json").write_text(
'{"dependencies":{"react":"latest","vite":"latest"},'
'"devDependencies":{"vitest":"latest"}}',
encoding="utf-8",
)
(repo / "src").mkdir()
(repo / "src" / "api").mkdir()
(repo / "src" / "api" / "routes.ts").write_text(
"export function routeRequest(input: Request): Response {\n"
" return new Response('ok')\n"
"}\n",
encoding="utf-8",
)
(repo / "src" / "api" / "routes.spec.ts").write_text(
"import { describe, it } from 'vitest'\n"
"describe('routes', () => { it('works', () => {}) })\n",
encoding="utf-8",
)
return repo
def write_empty_repo(root: Path) -> Path:
repo = root / "empty-repo"
repo.mkdir()
return repo