[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M799H2Q1XR1KAPD0XV6TMV1M":3,"skill-same:01M799H2Q1XR1KAPD0XV6TMV1M":55},{"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":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M799H2Q1XR1KAPD0XV6TMV1M","generating-unit-tests",null,"Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions.\nUse when creating test coverage for functions, classes, or modules.\nTrigger with phrases like \"generate unit tests\", \"create tests for\", or \"add test coverage\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftesting--unit-test-generator--generating-unit-tests\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: generating-unit-tests\ndescription: |\n  Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions.\n  Use when creating test coverage for functions, classes, or modules.\n  Trigger with phrases like \"generate unit tests\", \"create tests for\", or \"add test coverage\".\n\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(test:unit-*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\ntags: [testing, unit-tests]\n---\n# Unit Test Generator\n\n## Overview\n\nAutomatically generate comprehensive unit tests from source code analysis covering happy paths, edge cases, boundary conditions, and error handling. Supports Jest, Vitest, Mocha (JavaScript\u002FTypeScript), pytest (Python), JUnit 5 (Java), and Go testing with testify.\n\n## Prerequisites\n\n- Testing framework installed and configured (`jest`, `vitest`, `pytest`, `junit-jupiter`, or Go `testing`)\n- Source code with clear function signatures, type annotations, or JSDoc comments\n- Test directory structure established (`__tests__\u002F`, `tests\u002F`, `spec\u002F`, or `*_test.go`)\n- Mocking library available (`jest.mock`, `unittest.mock`, `Mockito`, or `gomock`)\n- Package scripts configured to run tests (`npm test`, `pytest`, `go test`)\n\n## Instructions\n\n1. Scan the codebase with Glob to locate source files that lack corresponding test files (e.g., `src\u002Futils\u002Fparser.ts` without `__tests__\u002Fparser.test.ts`).\n2. Read each untested source file and extract:\n   - All exported functions and class methods with their signatures.\n   - Parameter types, return types, and thrown exceptions.\n   - External dependencies (imports from other modules, third-party libraries, I\u002FO).\n   - Pure vs. impure function classification.\n3. For each function, generate test cases in these categories:\n   - **Happy path**: Valid inputs producing expected outputs (at least 2 cases).\n   - **Edge cases**: Empty strings, empty arrays, zero, negative numbers, `null`, `undefined`, maximum values.\n   - **Error conditions**: Invalid types, missing required fields, network failures, permission errors.\n   - **Boundary values**: Off-by-one, integer overflow, string length limits.\n4. Create mock declarations for all external dependencies:\n   - Database calls return predictable fixture data.\n   - HTTP clients return canned responses with configurable status codes.\n   - File system operations use in-memory buffers or temp directories.\n5. Write the test file following project conventions:\n   - Match the existing test file naming pattern (`*.test.ts`, `*.spec.js`, `test_*.py`).\n   - Group tests in `describe`\u002F`context` blocks by function name.\n   - Use `beforeEach`\u002F`afterEach` for setup and teardown.\n   - Include inline comments explaining non-obvious test rationale.\n6. Run the generated tests to verify they pass, then check coverage to confirm the target function is fully exercised.\n7. Report coverage gaps and suggest additional test cases for uncovered branches.\n\n## Output\n\n- Test files placed alongside source files or in the project's test directory\n- Mock\u002Fstub files for external dependencies\n- Coverage report showing line, branch, and function coverage for tested modules\n- List of remaining coverage gaps with suggested test cases\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| `Cannot find module` on import | Test file path does not match project module resolution | Check `tsconfig.json` paths and `moduleNameMapper` in Jest config |\n| Mock not intercepting calls | Mock defined after module import caches the real implementation | Move `jest.mock()` calls to the top of the file before any imports |\n| Async test timeout | Promise never resolves due to missing `await` or unhandled rejection | Add `await` before async calls; increase timeout with `jest.setTimeout()` |\n| Tests pass alone but fail together | Shared mutable state leaking between tests | Reset state in `afterEach`; avoid module-level variables; use `jest.isolateModules()` |\n| Snapshot mismatch on first run | No existing snapshot baseline | Run with `--updateSnapshot` on first execution to create the baseline |\n\n## Examples\n\n**Jest test for a string utility:**\n```typescript\nimport { slugify } from '..\u002Fsrc\u002Futils\u002Fslugify';\n\ndescribe('slugify', () => {\n  it('converts spaces to hyphens', () => {\n    expect(slugify('hello world')).toBe('hello-world');\n  });\n  it('lowercases all characters', () => {\n    expect(slugify('Hello World')).toBe('hello-world');\n  });\n  it('removes special characters', () => {\n    expect(slugify('hello@world!')).toBe('helloworld');\n  });\n  it('handles empty string', () => {\n    expect(slugify('')).toBe('');\n  });\n  it('trims leading and trailing whitespace', () => {\n    expect(slugify('  spaced  ')).toBe('spaced');\n  });\n});\n```\n\n**pytest test for a data validator:**\n```python\nimport pytest\nfrom myapp.validators import validate_email\n\nclass TestValidateEmail:\n    def test_accepts_valid_email(self):\n        assert validate_email(\"user@example.com\") is True\n\n    def test_rejects_missing_at_sign(self):\n        assert validate_email(\"userexample.com\") is False\n\n    def test_rejects_empty_string(self):\n        assert validate_email(\"\") is False\n\n    def test_rejects_none(self):\n        with pytest.raises(TypeError):\n            validate_email(None)\n```\n\n## Resources\n\n- Jest documentation: https:\u002F\u002Fjestjs.io\u002Fdocs\u002Fgetting-started\n- Vitest documentation: https:\u002F\u002Fvitest.dev\u002Fguide\u002F\n- pytest documentation: https:\u002F\u002Fdocs.pytest.org\u002F\n- JUnit 5 User Guide: https:\u002F\u002Fjunit.org\u002Fjunit5\u002Fdocs\u002Fcurrent\u002Fuser-guide\u002F\n- Go testing package: https:\u002F\u002Fpkg.go.dev\u002Ftesting\n- AAA pattern (Arrange-Act-Assert): https:\u002F\u002Fautomationpanda.com\u002F2020\u002F07\u002F07\u002Farrange-act-assert-pattern-for-python-unit-tests\u002F","# Unit Test Generator\n\n## Overview\n\nAutomatically generate comprehensive unit tests from source code analysis covering happy paths, edge cases, boundary conditions, and error handling. Supports Jest, Vitest, Mocha (JavaScript\u002FTypeScript), pytest (Python), JUnit 5 (Java), and Go testing with testify.\n\n## Prerequisites\n\n- Testing framework installed and configured (`jest`, `vitest`, `pytest`, `junit-jupiter`, or Go `testing`)\n- Source code with clear function signatures, type annotations, or JSDoc comments\n- Test directory structure established (`__tests__\u002F`, `tests\u002F`, `spec\u002F`, or `*_test.go`)\n- Mocking library available (`jest.mock`, `unittest.mock`, `Mockito`, or `gomock`)\n- Package scripts configured to run tests (`npm test`, `pytest`, `go test`)\n\n## Instructions\n\n1. Scan the codebase with Glob to locate source files that lack corresponding test files (e.g., `src\u002Futils\u002Fparser.ts` without `__tests__\u002Fparser.test.ts`).\n2. Read each untested source file and extract:\n   - All exported functions and class methods with their signatures.\n   - Parameter types, return types, and thrown exceptions.\n   - External dependencies (imports from other modules, third-party libraries, I\u002FO).\n   - Pure vs. impure function classification.\n3. For each function, generate test cases in these categories:\n   - **Happy path**: Valid inputs producing expected outputs (at least 2 cases).\n   - **Edge cases**: Empty strings, empty arrays, zero, negative numbers, `null`, `undefined`, maximum values.\n   - **Error conditions**: Invalid types, missing required fields, network failures, permission errors.\n   - **Boundary values**: Off-by-one, integer overflow, string length limits.\n4. Create mock declarations for all external dependencies:\n   - Database calls return predictable fixture data.\n   - HTTP clients return canned responses with configurable status codes.\n   - File system operations use in-memory buffers or temp directories.\n5. Write the test file following project conventions:\n   - Match the existing test file naming pattern (`*.test.ts`, `*.spec.js`, `test_*.py`).\n   - Group tests in `describe`\u002F`context` blocks by function name.\n   - Use `beforeEach`\u002F`afterEach` for setup and teardown.\n   - Include inline comments explaining non-obvious test rationale.\n6. Run the generated tests to verify they pass, then check coverage to confirm the target function is fully exercised.\n7. Report coverage gaps and suggest additional test cases for uncovered branches.\n\n## Output\n\n- Test files placed alongside source files or in the project's test directory\n- Mock\u002Fstub files for external dependencies\n- Coverage report showing line, branch, and function coverage for tested modules\n- List of remaining coverage gaps with suggested test cases\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| `Cannot find module` on import | Test file path does not match project module resolution | Check `tsconfig.json` paths and `moduleNameMapper` in Jest config |\n| Mock not intercepting calls | Mock defined after module import caches the real implementation | Move `jest.mock()` calls to the top of the file before any imports |\n| Async test timeout | Promise never resolves due to missing `await` or unhandled rejection | Add `await` before async calls; increase timeout with `jest.setTimeout()` |\n| Tests pass alone but fail together | Shared mutable state leaking between tests | Reset state in `afterEach`; avoid module-level variables; use `jest.isolateModules()` |\n| Snapshot mismatch on first run | No existing snapshot baseline | Run with `--updateSnapshot` on first execution to create the baseline |\n\n## Examples\n\n**Jest test for a string utility:**\n```typescript\nimport { slugify } from '..\u002Fsrc\u002Futils\u002Fslugify';\n\ndescribe('slugify', () => {\n  it('converts spaces to hyphens', () => {\n    expect(slugify('hello world')).toBe('hello-world');\n  });\n  it('lowercases all characters', () => {\n    expect(slugify('Hello World')).toBe('hello-world');\n  });\n  it('removes special characters', () => {\n    expect(slugify('hello@world!')).toBe('helloworld');\n  });\n  it('handles empty string', () => {\n    expect(slugify('')).toBe('');\n  });\n  it('trims leading and trailing whitespace', () => {\n    expect(slugify('  spaced  ')).toBe('spaced');\n  });\n});\n```\n\n**pytest test for a data validator:**\n```python\nimport pytest\nfrom myapp.validators import validate_email\n\nclass TestValidateEmail:\n    def test_accepts_valid_email(self):\n        assert validate_email(\"user@example.com\") is True\n\n    def test_rejects_missing_at_sign(self):\n        assert validate_email(\"userexample.com\") is False\n\n    def test_rejects_empty_string(self):\n        assert validate_email(\"\") is False\n\n    def test_rejects_none(self):\n        with pytest.raises(TypeError):\n            validate_email(None)\n```\n\n## Resources\n\n- Jest documentation: https:\u002F\u002Fjestjs.io\u002Fdocs\u002Fgetting-started\n- Vitest documentation: https:\u002F\u002Fvitest.dev\u002Fguide\u002F\n- pytest documentation: https:\u002F\u002Fdocs.pytest.org\u002F\n- JUnit 5 User Guide: https:\u002F\u002Fjunit.org\u002Fjunit5\u002Fdocs\u002Fcurrent\u002Fuser-guide\u002F\n- Go testing package: https:\u002F\u002Fpkg.go.dev\u002Ftesting\n- AAA pattern (Arrange-Act-Assert): https:\u002F\u002Fautomationpanda.com\u002F2020\u002F07\u002F07\u002Farrange-act-assert-pattern-for-python-unit-tests\u002F",{"name":5,"tags":24,"author":27,"license":15,"version":28,"description":29,"allowed-tools":30,"compatible-with":31},[25,26],"testing","unit-tests","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions.\nUse when creating test coverage for functions, classes, or modules.\nTrigger with phrases like \"generate unit tests\", \"create tests for\", or \"add test coverage\".\n","Read, Write, Edit, Grep, Glob, Bash(test:unit-*)","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Ftesting--unit-test-generator--generating-unit-tests",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill generating-unit-tests",{"tool":47,"command":48},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill generating-unit-tests",{"tool":50,"command":51},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill generating-unit-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftesting--unit-test-generator--generating-unit-tests\u002FSKILL.md",true,[],[56,63,70,77,84,92],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"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},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]