Answer: You can give GitHub Copilot the prompt: "Create a unit test to ensure the service is called correctly. Mock the service object." Status: Confirmed Entry: tool/github-copilot/features/mock-objects-example-prompt Revision: 3 Digest: sha256:423e5e376702181c (changes whenever the content changes) Timeline: Created: 2026-11-13T03:33:46Z Last changed: 2026-11-18T13:12:28Z (test framework assumption: — → vitest) Last verified: 2026-11-20T13:15:54Z Next check: 2026-11-21T13:15:54Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of example prompt | Create a unit test to ensure the service is called correctly. Mock the service object. | [1] | 2026-11-20 test framework assumption | vitest | [1] | 2026-11-20 Sources: [1] GitHub. "Creating mock objects to abstract layers - GitHub Docs". https://docs.github.com/en/copilot/tutorials/copilot-cookbook/testing-code/create-mock-objects Role: primary. Accessed: 2026-11-20T13:15:54Z Quote: "Create a unit test to ensure the service is called correctly. Mock the service object." (Supports: example prompt) Quote: "This example assumes you are using vitest for your tests" (Supports: test framework assumption) Snapshot SHA-256: 9a024fffe774e8904e9ede160720003bed32ebd98cb36ef3e04e10d21c2c54e3 (captured 2026-11-18T13:12:27Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:12:28Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:15:54Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:15:54Z Last attempt: 2026-11-20T13:15:54Z Notes and limitations: Extracted automatically from a single official source (section "Example prompt"). Related: https://latestn.com/tool/github-copilot/features/onboarding-plan-prompt-contents What does the GitHub Copilot onboarding plan prompt contain? https://latestn.com/tool/github-copilot/features/openapi-specification-prompt What does the OpenAPI specification prompt in GitHub Copilot do? https://latestn.com/tool/github-copilot/features/plugin-contents What do GitHub Copilot plugins contain? https://latestn.com/tool/github-copilot/features/manage-session-lifecycle How do I delete or clean up old GitHub Copilot SDK sessions? https://latestn.com/tool/github-copilot/features/marketplace-catalog-contents What does the GitHub Copilot marketplace catalog contain? https://latestn.com/tool/github-copilot/features/mcp-best-practices What are the best practices for using MCP with GitHub Copilot agent mode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:12:28Z | changed | test framework assumption: — → vitest | [1] 2026-11-18T13:12:28Z | changed | test framework assumed: vitest → — | [1] 2026-11-16T13:00:27Z | changed | test framework assumed: — → vitest | [1] 2026-11-13T03:33:46Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/features/mock-objects-example-prompt/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/features/mock-objects-example-prompt POST: https://latestn.com/dispute/tool/github-copilot/features/mock-objects-example-prompt with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/features/mock-objects-example-prompt?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What example prompt can I give GitHub Copilot to generate mock objects? Revision 3, last verified 2026-11-20T13:15:54Z. https://latestn.com/tool/github-copilot/features/mock-objects-example-prompt (accessed 2026-11-21T09:50:49Z). @misc{LatestN_tool_github_copilot_features_mock_objects_example_prompt_r3, title = {What example prompt can I give GitHub Copilot to generate mock objects?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/features/mock-objects-example-prompt}}, note = {Revision 3; digest sha256:423e5e376702181c; last verified 2026-11-20T13:15:54Z; accessed 2026-11-21T09:50:49Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/features/mock-objects-example-prompt