[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DF71FZ77BBJVE1JDA95M2Y":3,"skill-same:01M7DF71FZ77BBJVE1JDA95M2Y":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7DF71FZ77BBJVE1JDA95M2Y","unit-testing",null,"Write fast, isolated tests for one unit of logic using the repository's test conventions. Use when new or changed logic can be proven without real external collaborators; use integration-testing when behavior depends on a boundary.","andersonmrodrigues\u002Fpaved","andersonmrodrigues","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F13907380?v=4","01M7DEV3FP2VMQZ3FP2FP1TK1C","Anderson Rodrigues","01M7DEV3GC2QAQBW4FMNT98H48",1,"MIT","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Fplugins\u002Fpaved\u002Fruntime\u002Fpaved-core\u002Fcore\u002Fskills\u002Ftesting\u002Funit-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: unit-testing\ndescription: >-\n  Write fast, isolated tests for one unit of logic using the repository's test conventions. Use when new or changed logic can be proven without real external collaborators; use integration-testing when behavior depends on a boundary.\n---\n\n# Unit testing\n\n## When to use\n\nWhenever a development or debugging skill needs a claim about local logic proven. A unit\ntest runs in isolation from networks, databases, file systems shared with other tests,\nclocks and randomness, and runs in well under a second.\n\n## Required context\n\nThe verification profile: how the project runs its unit tests, and how to run one test.\nUseful: the technology context and adapter knowledge for the test framework in use.\n\n## Preconditions\n\nThe behavior to test is stated as a claim with its inputs and expected result.\n\n## Procedure\n\n1. **Discover the conventions** before writing anything: find the tests nearest to the\n   code under test and read two or three. Note where they live, how files and tests are\n   named, how they are structured (arrange, act, assert or its local equivalent), which\n   test doubles and assertion helpers they use, and how fixtures are built.\n2. **Choose the cases** from the claim: the expected path, each boundary (empty, one,\n   many, limits), invalid input, and each way a collaborator can fail.\n3. **Write one test per behavior**, named after the behavior, not after the method. Each\n   test fails for one reason.\n4. **Replace only what crosses the unit's boundary** with test doubles: remote calls,\n   storage, time, randomness. Do not replace the logic being tested.\n5. **Assert on outcomes** (returned values, raised errors, recorded calls to\n   collaborators that matter), not on internal steps.\n6. **Watch each new test fail once**, by running it before the code exists or by breaking\n   the code briefly. A test that has never failed has not been shown to test anything.\n7. **Run the unit suite** for the affected module and keep it green.\n\n## Tools\n\nNone. The command to run tests comes from the verification profile.\n\n## Rules\n\n`core.architecture.follow-existing-patterns` applies to tests as much as to code: a new\ntest framework, assertion style or fixture mechanism needs a human decision.\n\n## Verification\n\nRequired: `unit`.\n\n## Evidence\n\nA check result for the unit suite that contains the new or changed tests.\n\n## Completion criteria\n\n- Every claim assigned to this skill has at least one test asserting it.\n- Each new test was seen failing once and now passes.\n- The module's unit suite passes.\n\n## Failure modes\n\n| Failure | Signal | Response |\n|---|---|---|\n| Testing the double | The assertion checks a value the double returned | Assert on the unit's own behavior |\n| Brittle test | Test breaks on a refactor that keeps behavior | Assert on outcomes, not internal calls |\n| Hidden dependency | Test fails depending on order, time or machine | Remove the shared state or inject it |\n| No unit test infrastructure | No existing unit tests to follow | Record a gap; ask before introducing a framework |\n\n## References\n\nNone.\n","# Unit testing\n\n## When to use\n\nWhenever a development or debugging skill needs a claim about local logic proven. A unit\ntest runs in isolation from networks, databases, file systems shared with other tests,\nclocks and randomness, and runs in well under a second.\n\n## Required context\n\nThe verification profile: how the project runs its unit tests, and how to run one test.\nUseful: the technology context and adapter knowledge for the test framework in use.\n\n## Preconditions\n\nThe behavior to test is stated as a claim with its inputs and expected result.\n\n## Procedure\n\n1. **Discover the conventions** before writing anything: find the tests nearest to the\n   code under test and read two or three. Note where they live, how files and tests are\n   named, how they are structured (arrange, act, assert or its local equivalent), which\n   test doubles and assertion helpers they use, and how fixtures are built.\n2. **Choose the cases** from the claim: the expected path, each boundary (empty, one,\n   many, limits), invalid input, and each way a collaborator can fail.\n3. **Write one test per behavior**, named after the behavior, not after the method. Each\n   test fails for one reason.\n4. **Replace only what crosses the unit's boundary** with test doubles: remote calls,\n   storage, time, randomness. Do not replace the logic being tested.\n5. **Assert on outcomes** (returned values, raised errors, recorded calls to\n   collaborators that matter), not on internal steps.\n6. **Watch each new test fail once**, by running it before the code exists or by breaking\n   the code briefly. A test that has never failed has not been shown to test anything.\n7. **Run the unit suite** for the affected module and keep it green.\n\n## Tools\n\nNone. The command to run tests comes from the verification profile.\n\n## Rules\n\n`core.architecture.follow-existing-patterns` applies to tests as much as to code: a new\ntest framework, assertion style or fixture mechanism needs a human decision.\n\n## Verification\n\nRequired: `unit`.\n\n## Evidence\n\nA check result for the unit suite that contains the new or changed tests.\n\n## Completion criteria\n\n- Every claim assigned to this skill has at least one test asserting it.\n- Each new test was seen failing once and now passes.\n- The module's unit suite passes.\n\n## Failure modes\n\n| Failure | Signal | Response |\n|---|---|---|\n| Testing the double | The assertion checks a value the double returned | Assert on the unit's own behavior |\n| Brittle test | Test breaks on a refactor that keeps behavior | Assert on outcomes, not internal calls |\n| Hidden dependency | Test fails depending on order, time or machine | Remove the shared state or inject it |\n| No unit test infrastructure | No existing unit tests to follow | Record a gap; ask before introducing a framework |\n\n## References\n\nNone.\n",{"name":5,"description":7},"main","1cd80f05aff924ea609012e864fa5c22c16c7d2d","plugins\u002Fpaved\u002Fruntime\u002Fpaved-core\u002Fcore\u002Fskills\u002Ftesting\u002Funit-testing",0,"https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues","2026-11-14 20:09:28",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add andersonmrodrigues\u002Fpaved --skill unit-testing",{"tool":37,"command":38},"bunx","bunx skills add andersonmrodrigues\u002Fpaved --skill unit-testing",{"tool":40,"command":41},"pnpm","pnpm dlx skills add andersonmrodrigues\u002Fpaved --skill unit-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Fplugins\u002Fpaved\u002Fruntime\u002Fpaved-core\u002Fcore\u002Fskills\u002Ftesting\u002Funit-testing\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"skill.yaml","REFERENCE","参考文档",300,"https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Fplugins\u002Fpaved\u002Fruntime\u002Fpaved-core\u002Fcore\u002Fskills\u002Ftesting\u002Funit-testing\u002Fskill.yaml",[52,59,65,71,77,83],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7DFBWJT4T1MPBHTWT19PBEK","sample-skill","Does a sample task. Use when a sample is needed.","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fvalid\u002Fsample-skill\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7DFBS6WTK30PBSW4ZS0NPWT","unexplained-contract","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Finvalid\u002Funexplained-contract\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7DFBPJGG170V9WTMFWY73R4","shell-block","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Finvalid\u002Fshell-block\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7DFBMZYR20JPTXNE5A8EFG6","project-identifier","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Finvalid\u002Fproject-identifier\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7DFBJ8J533DAKA3FTF54SX3","oversized","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Finvalid\u002Foversized\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7DFBFAD0RYCRHTZ2JW4RX7E","no-activation","Does a sample task.","https:\u002F\u002Fgithub.com\u002Fandersonmrodrigues\u002Fpaved\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Finvalid\u002Fno-activation\u002FSKILL.md",[],[]]