[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7597YVRCF4Q8PBGW5XMBM0P":3,"skill-same:01M7597YVRCF4Q8PBGW5XMBM0P":45},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7597YVRCF4Q8PBGW5XMBM0P","testing-patterns",null,"Test implementation patterns. Use this when writing tests — table-driven tests, mocking, fixtures, assertions, and parallel execution.","aydabd\u002Frunspec","aydabd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F88633794?v=4","01M7592YHMQK95Z2DAJAPR4H6J","Aydina","01M7592YJMPN2HYFRSMJ40K61Q",0,"MIT","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting-patterns\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: testing-patterns\ndescription: >\n  Test implementation patterns. Use this when writing tests — table-driven tests,\n  mocking, fixtures, assertions, and parallel execution.\n---\n\n# Skill: Testing Patterns\n\n## Table-Driven Tests\n\nPrefer table-driven tests when testing the same function across multiple scenarios:\n\n```text\ntests := []struct {\n    name    string\n    input   InputType\n    want    OutputType\n    wantErr bool\n}{\n    {\"valid input\", validInput, expectedOutput, false},\n    {\"empty input returns error\", emptyInput, zero, true},\n    {\"boundary value\", boundaryInput, boundaryOutput, false},\n}\nfor _, tt := range tests {\n    t.Run(tt.name, func(t *testing.T) {\n        got, err := FunctionUnderTest(tt.input)\n        \u002F\u002F assert based on tt.wantErr, tt.want\n    })\n}\n```\n\n## Mocking External Dependencies\n\nMock at the **interface** boundary, not the implementation:\n\n```text\n\u002F\u002F Define a small interface for the dependency\ntype DataStore interface {\n    Get(key string) (string, error)\n}\n\n\u002F\u002F Create a mock that implements the interface\ntype mockStore struct {\n    data map[string]string\n    err  error\n}\n```\n\nKeep mocks in the same test file that uses them. Never mock what you own — test\nyour own code with real implementations when possible.\n\n## Test Fixture Setup\n\nExtract repetitive setup into named helper functions:\n\n- Mark helpers with the language's test-helper annotation (e.g. `t.Helper()` in Go).\n- Return fully configured objects — don't force tests to build state step by step.\n- Use temporary directories for file I\u002FO tests; clean up automatically.\n\n## Assertions\n\nUse assertion libraries for readable failure messages:\n\n- **Equality**: `assertEqual(expected, actual)` — value comparison.\n- **Error expected**: `assertError(err)` — confirms failure path.\n- **No error**: `assertNoError(err)` — confirms success path.\n- **Contains**: `assertContains(haystack, needle)` — partial match.\n- **Fatal vs soft**: Use fatal assertions when subsequent checks are meaningless\n  after a failure; use soft assertions when all failures should be reported.\n\n## Test Isolation\n\n- Each test must be independently runnable — no ordering dependencies.\n- Avoid shared mutable state between tests.\n- Use parallel execution for independent tests to catch race conditions.\n- Clean up all resources created during tests (files, connections, goroutines).\n","# Skill: Testing Patterns\n\n## Table-Driven Tests\n\nPrefer table-driven tests when testing the same function across multiple scenarios:\n\n```text\ntests := []struct {\n    name    string\n    input   InputType\n    want    OutputType\n    wantErr bool\n}{\n    {\"valid input\", validInput, expectedOutput, false},\n    {\"empty input returns error\", emptyInput, zero, true},\n    {\"boundary value\", boundaryInput, boundaryOutput, false},\n}\nfor _, tt := range tests {\n    t.Run(tt.name, func(t *testing.T) {\n        got, err := FunctionUnderTest(tt.input)\n        \u002F\u002F assert based on tt.wantErr, tt.want\n    })\n}\n```\n\n## Mocking External Dependencies\n\nMock at the **interface** boundary, not the implementation:\n\n```text\n\u002F\u002F Define a small interface for the dependency\ntype DataStore interface {\n    Get(key string) (string, error)\n}\n\n\u002F\u002F Create a mock that implements the interface\ntype mockStore struct {\n    data map[string]string\n    err  error\n}\n```\n\nKeep mocks in the same test file that uses them. Never mock what you own — test\nyour own code with real implementations when possible.\n\n## Test Fixture Setup\n\nExtract repetitive setup into named helper functions:\n\n- Mark helpers with the language's test-helper annotation (e.g. `t.Helper()` in Go).\n- Return fully configured objects — don't force tests to build state step by step.\n- Use temporary directories for file I\u002FO tests; clean up automatically.\n\n## Assertions\n\nUse assertion libraries for readable failure messages:\n\n- **Equality**: `assertEqual(expected, actual)` — value comparison.\n- **Error expected**: `assertError(err)` — confirms failure path.\n- **No error**: `assertNoError(err)` — confirms success path.\n- **Contains**: `assertContains(haystack, needle)` — partial match.\n- **Fatal vs soft**: Use fatal assertions when subsequent checks are meaningless\n  after a failure; use soft assertions when all failures should be reported.\n\n## Test Isolation\n\n- Each test must be independently runnable — no ordering dependencies.\n- Avoid shared mutable state between tests.\n- Use parallel execution for independent tests to catch race conditions.\n- Clean up all resources created during tests (files, connections, goroutines).\n",{"name":5,"description":7},"main","d6ce6dc9174c4e02ab33a67718f7944384c484fe",".github\u002Fskills\u002Ftesting-patterns","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec","https:\u002F\u002Fgithub.com\u002Faydabd","Software and test developer","2026-06-06 11:54:21",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add aydabd\u002Frunspec --skill testing-patterns",{"tool":37,"command":38},"bunx","bunx skills add aydabd\u002Frunspec --skill testing-patterns",{"tool":40,"command":41},"pnpm","pnpm dlx skills add aydabd\u002Frunspec --skill testing-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting-patterns\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M75982GSJXBYJ61CHC1VFMXG","testing-strategy","Testing philosophy and strategy. Use this when deciding what to test, naming tests, or identifying corner cases.","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting-strategy\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7597V61WJT5WKNNZ73BRB3S","testing-integration","Integration and E2E testing design. Use this when writing integration tests, E2E tests, or deciding what belongs in each test layer.","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting-integration\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7597S9Y5CK93T4MCWC0Y47M","test-review","Test review for missing coverage, weak assertions, flaky tests, isolation, fixtures, and regression risk.","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftest-review\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7597NE7EB81CJWFMV6AMBF2","test-impact-selection","Select the minimal useful tests to run based on changed files, impacted components, and repository conventions.","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftest-impact-selection\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7597JEKGQMMH8YM3QEDC10B","severity-classification","Classify review findings into blocking, non-blocking, or note with consistent merge-risk rules.","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fseverity-classification\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7597GQFXXSG8AAS90BA7JQK","security-review","Security review for auth, authorization, secrets, injection, crypto, dependency misuse, and unsafe data exposure.","https:\u002F\u002Fgithub.com\u002Faydabd\u002Frunspec\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[],[]]