Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs focused unit, integration and end-to-end tests with deterministic fixtures and mocked remote providers.
86% 95%+9 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 19 of 22 without it.
We are writing unit tests for a semantic vector search module that calls OpenAI's text embedding API. How should the API response be mocked in Jest or Vitest without making real network requests?
Mocks the embedding function to resolve to a 1536-element array of mock numbers.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Use installed tdd for the overall workflow. This entry covers test design.
Test observable inputs, outputs, side effects, errors and important boundaries. Use unit checks for local decisions, integration checks for contracts, and end-to-end checks for important flows. Follow repository requirements rather than imposing a universal coverage threshold.
A regression fails against the old bug and passes with the repair. Use deterministic fixtures, isolated state and assertions that distinguish wrong from intended behavior. Avoid incidental snapshots, duplicated implementation and trivial wiring already exercised by a real entry-point check.
Mock paid or remote providers at the boundary. Validate request/response schemas and errors; mocked success alone does not prove the live integration. Use a separately authorized integration check where necessary.
Run focused checks first, then affected suites. Preserve diagnostics and fix flaky shared state rather than adding retries. Report what ran and what remains unverified.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.