Answer: The GitHub Copilot unit test generation prompt is a prompt file with frontmatter (agent: 'agent', description: 'Generate unit tests for selected functions or methods') and sections for Task, Test Generation Strategy, Test Structure Requirements, Target function, Testing framework, and Guidelines. It instructs generating 5-8 focused test cases covering core functionality, input validation, error handling, and side effects, following the AAA pattern. Status: Confirmed Entry: tool/github-copilot/features/unit-test-prompt-contents Revision: 3 Digest: sha256:c0463d4c86c7bd47 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:34:14Z Last changed: 2026-11-19T13:10:13Z (agent: — → agent) Last verified: 2026-11-20T13:16:34Z Next check: 2026-11-21T13:16:34Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of description | Generate unit tests for selected functions or methods | | [1] | 2026-11-20 agent | agent | | [1] | 2026-11-20 test case count | 5-8 | test cases | [1] | 2026-11-20 test structure pattern | AAA pattern: Arrange, Act, Assert | | [1] | 2026-11-20 target function input | ${input:function_name:Which function or method should be tested?} | | [1] | 2026-11-20 testing framework input | ${input:framework:Which framework? (jest/vitest/mocha/pytest/rspec/etc)} | | [1] | 2026-11-20 Sources: [1] GitHub. "Generate unit tests - GitHub Docs". https://docs.github.com/en/copilot/tutorials/customization-library/prompt-files/generate-unit-tests Role: primary. Accessed: 2026-11-20T13:16:34Z Quote: "description: 'Generate unit tests for selected functions or methods'" (Supports: description) Quote: "agent: 'agent'" (Supports: agent) Quote: "Generate 5-8 focused test cases covering the most important scenarios" (Supports: test case count) Quote: "Follow AAA pattern: Arrange, Act, Assert" (Supports: test structure pattern) Quote: "Target function: ${input:function_name:Which function or method should be tested?}" (Supports: target function input) Quote: "Testing framework: ${input:framework:Which framework? (jest/vitest/mocha/pytest/rspec/etc)}" (Supports: testing framework input) Snapshot SHA-256: 3fe9d2cdebad63a909dd87c84841b8a14e62c7eb5ac697355fb843bd0493ab6a (captured 2026-11-18T13:13:15Z) 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:13:15Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:16:34Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:16:34Z Last attempt: 2026-11-20T13:16:34Z Notes and limitations: Extracted automatically from a single official source (section "Unit test generation prompt"). Related: https://latestn.com/tool/github-copilot/features/unsupported-instruction-types What should I not include in GitHub Copilot code review custom instructions? https://latestn.com/tool/github-copilot/features/use-copilot-chat-edit-mode How do I use GitHub Copilot Chat in edit mode to change code? https://latestn.com/tool/github-copilot/features/use-copilot-code-review How do I use GitHub Copilot code review on GitHub? https://latestn.com/tool/github-copilot/features/translate-code-prompt How do I use GitHub Copilot to translate code to a different programming language? https://latestn.com/tool/github-copilot/features/unit-test-example-response What does a GitHub Copilot response look like when it generates unit tests? https://latestn.com/tool/github-copilot/features/unit-test-instruction-example What testing practices does GitHub Copilot recommend in its custom instructions example for unit tests? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:10:13Z | changed | agent: — → agent | [1] 2026-11-19T13:10:13Z | changed | strategy categories: Core Functionality Tests → — | [1] 2026-11-17T13:36:56Z | changed | strategy categories: — → Core Functionality Tests | [1] 2026-11-17T13:36:56Z | changed | agent: agent → — | [1] 2026-11-13T03:34:14Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/features/unit-test-prompt-contents/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/unit-test-prompt-contents POST: https://latestn.com/dispute/tool/github-copilot/features/unit-test-prompt-contents with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/features/unit-test-prompt-contents?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What does the GitHub Copilot unit test generation prompt contain? Revision 3, last verified 2026-11-20T13:16:34Z. https://latestn.com/tool/github-copilot/features/unit-test-prompt-contents (accessed 2026-11-21T09:55:07Z). @misc{LatestN_tool_github_copilot_features_unit_test_prompt_contents_r3, title = {What does the GitHub Copilot unit test generation prompt contain?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/features/unit-test-prompt-contents}}, note = {Revision 3; digest sha256:c0463d4c86c7bd47; last verified 2026-11-20T13:16:34Z; accessed 2026-11-21T09:55:07Z} } 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/unit-test-prompt-contents