{"uid":"cap_EfBrSTFFQM0cdthsitwO-","slug":"obol-file-to-vitest-unit-tests-github-pr-generator-4c02b17e","name":"Obol File-to-Vitest Unit Tests GitHub PR Generator","description":"Obol: File → Vitest unit tests → GitHub PR — $5 USDC","url":"https://api.obol.sh/tests?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["path","repo"],"properties":{"path":{"type":"string","description":"Path to the file to generate tests for (e.g. src/lib/utils.ts)"},"repo":{"type":"string","description":"GitHub repo in owner/repo format"},"email":{"type":"string","description":"Email address to notify when PR is ready"},"framework":{"type":"string","description":"Test framework to use (defaults to vitest)"}}},"responseSchema":{"pr":{"type":"string","description":"URL of the opened pull request"},"fork":{"type":"string","description":"URL of the forked repository"},"files":{"type":"array","description":"File paths written to the branch"},"branch":{"type":"string","description":"Branch name on the fork"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LW5BwMMPEO-GGjUgZGFEp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates Vitest unit tests for a specified file in a GitHub repo and opens a pull request with the results","exampleAgentPrompt":"Use Obol to generate Vitest unit tests for src/lib/utils.ts in my repo acme-corp/my-app and open a PR — notify me at dev@acme.com when it's ready.","exampleUseCases":[{"title":"Bootstrap tests for new utility","prompt":"I just added a new helper file at src/helpers/dateFormatter.ts in my repo jane-dev/dashboard-app — can you use Obol to generate Vitest unit tests for it and open a PR so I can review the coverage?"},{"title":"Add test coverage before code review","prompt":"Before I merge this PR, I need Vitest tests for src/services/authService.js in the repo myorg/backend-api — use Obol to generate them and open a pull request, and send a notification to team@myorg.io when it's done."},{"title":"Automate testing for open source contribution","prompt":"I want to contribute better test coverage to an open source project — use Obol to generate Vitest unit tests for src/core/parser.ts in the repo open-source-org/toolkit and submit a PR so the maintainers can review it."}],"resultDescription":"Returns a pull request URL pointing to the opened PR on a fork of the target repo, the fork URL, the branch name used, and a list of file paths written to that branch containing the generated Vitest test files.","failureModes":["Invalid or inaccessible GitHub repo (owner/repo format wrong or repo private without access) — returns error","File path does not exist in the specified repo — returns error or empty test output","Payment failure via x402 protocol — request rejected before processing","GitHub API rate limiting or fork creation failure — PR not opened","Invalid email address format — notification not sent but PR may still be created"],"whenToPreferThis":"Choose this endpoint when you need to automatically generate Vitest unit tests for a specific file in a GitHub repository and have them delivered as a pull request without manual setup. It is ideal for developer workflows that need quick test coverage bootstrapped from existing source files, especially when using the Vitest framework. Prefer this over manual test writing or generic code generation tools when you want GitHub PR delivery and optional email notification as part of the output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:25:12.125Z","isFirstParty":false,"canonicalSlug":"obol-file-to-vitest-unit-tests-github-pr-generator-4c02b17e"}