[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N4BW325QEZQC59DPD4VGA4":3,"skill-same:01M6N4BW325QEZQC59DPD4VGA4":52},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M6N4BW325QEZQC59DPD4VGA4","test-runner",null,"Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F代码质量与测试\u002Ftest-runner\u002FSKILL.md",[],[17,18,19],"test","test runner","runner","2026-11-10 10:12:30",false,"# test-runner\n\nWrite and run tests across languages and frameworks.\n\n## Framework Selection\n\n| Language | Unit Tests | Integration | E2E |\n|----------|-----------|-------------|-----|\n| TypeScript\u002FJS | Vitest (preferred), Jest | Supertest | Playwright |\n| Python | pytest | pytest + httpx | Playwright |\n| Swift | XCTest | XCTest | XCUITest |\n\n## Quick Start by Framework\n\n### Vitest (TypeScript \u002F JavaScript)\n```bash\nnpm install -D vitest @testing-library\u002Freact @testing-library\u002Fjest-dom\n```\n\n```typescript\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig'\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'jsdom',\n    setupFiles: '.\u002Ftests\u002Fsetup.ts',\n  },\n})\n```\n\n```bash\nnpx vitest              # Watch mode\nnpx vitest run          # Single run\nnpx vitest --coverage   # With coverage\n```\n\n### Jest\n```bash\nnpm install -D jest @types\u002Fjest ts-jest\n```\n\n```bash\nnpx jest                # Run all\nnpx jest --watch        # Watch mode\nnpx jest --coverage     # With coverage\nnpx jest path\u002Fto\u002Ftest   # Single file\n```\n\n### pytest (Python)\n```bash\nuv pip install pytest pytest-cov pytest-asyncio httpx\n```\n\n```bash\npytest                          # Run all\npytest -v                       # Verbose\npytest -x                       # Stop on first failure\npytest --cov=app                # With coverage\npytest tests\u002Ftest_api.py -k \"test_login\"  # Specific test\npytest --tb=short               # Short tracebacks\n```\n\n### XCTest (Swift)\n```bash\nswift test                      # Run all tests\nswift test --filter MyTests     # Specific test suite\nswift test --parallel           # Parallel execution\n```\n\n### Playwright (E2E)\n```bash\nnpm install -D @playwright\u002Ftest\nnpx playwright install\n```\n\n```bash\nnpx playwright test                    # Run all\nnpx playwright test --headed           # With browser visible\nnpx playwright test --debug            # Debug mode\nnpx playwright test --project=chromium # Specific browser\nnpx playwright show-report             # View HTML report\n```\n\n## TDD Workflow\n\n1. **Red** — Write a failing test that describes the desired behavior.\n2. **Green** — Write the minimum code to make the test pass.\n3. **Refactor** — Clean up the code while keeping tests green.\n\n```\n┌─────────┐     ┌─────────┐     ┌──────────┐\n│  Write   │────▶│  Write  │────▶│ Refactor │──┐\n│  Test    │     │  Code   │     │  Code    │  │\n│  (Red)   │     │ (Green) │     │          │  │\n└─────────┘     └─────────┘     └──────────┘  │\n     ▲                                          │\n     └──────────────────────────────────────────┘\n```\n\n## Test Patterns\n\n### Arrange-Act-Assert\n```typescript\ntest('calculates total with tax', () => {\n  \u002F\u002F Arrange\n  const cart = new Cart([{ price: 100, qty: 2 }]);\n\n  \u002F\u002F Act\n  const total = cart.totalWithTax(0.08);\n\n  \u002F\u002F Assert\n  expect(total).toBe(216);\n});\n```\n\n### Testing Async Code\n```typescript\ntest('fetches user data', async () => {\n  const user = await getUser('123');\n  expect(user.name).toBe('Colt');\n});\n```\n\n### Mocking\n```typescript\nimport { vi } from 'vitest';\n\nconst mockFetch = vi.fn().mockResolvedValue({\n  json: () => Promise.resolve({ id: 1, name: 'Test' }),\n});\nvi.stubGlobal('fetch', mockFetch);\n```\n\n### Testing API Endpoints (Python)\n```python\nimport pytest\nfrom httpx import AsyncClient\nfrom app.main import app\n\n@pytest.mark.asyncio\nasync def test_get_users():\n    async with AsyncClient(app=app, base_url=\"http:\u002F\u002Ftest\") as client:\n        response = await client.get(\"\u002Fusers\")\n    assert response.status_code == 200\n    assert isinstance(response.json(), list)\n```\n\n### Testing React Components\n```typescript\nimport { render, screen, fireEvent } from '@testing-library\u002Freact';\nimport { Button } from '.\u002FButton';\n\ntest('calls onClick when clicked', () => {\n  const handleClick = vi.fn();\n  render(\u003CButton onClick={handleClick}>Click me\u003C\u002FButton>);\n  fireEvent.click(screen.getByText('Click me'));\n  expect(handleClick).toHaveBeenCalledOnce();\n});\n```\n\n## Coverage Commands\n\n```bash\n# JavaScript\u002FTypeScript\nnpx vitest --coverage          # Vitest (uses v8 or istanbul)\nnpx jest --coverage            # Jest\n\n# Python\npytest --cov=app --cov-report=html    # HTML report\npytest --cov=app --cov-report=term    # Terminal output\npytest --cov=app --cov-fail-under=80  # Fail if \u003C 80%\n\n# View HTML coverage report\nopen coverage\u002Findex.html       # macOS\nopen htmlcov\u002Findex.html        # Python\n```\n\n## What to Test\n\n**Always test:**\n- Public API \u002F exported functions\n- Edge cases: empty input, null, boundary values\n- Error handling: invalid input, network failures\n- Business logic: calculations, state transitions\n\n**Don't bother testing:**\n- Private implementation details\n- Framework internals (React rendering, Express routing)\n- Trivial getters\u002Fsetters\n- Third-party library behavior\n",{},"main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","代码质量与测试\u002Ftest-runner",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill test-runner",{"tool":38,"command":39},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill test-runner",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill test-runner","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F代码质量与测试\u002Ftest-runner\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"_meta.json","REFERENCE","参考文档",276,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F代码质量与测试\u002Ftest-runner\u002F_meta.json",[53,77,100,108,115,142],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":20},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[55,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76],"safe","ethereum","defi","Optimization","user","use","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":20},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[],[83,84,85,86,87,88,89,62,90,66,91,92,93,94,95,96,97,98,99],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":101,"name":102,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[],[83,106,107,84,85,86,87,88,89,62,90,66,92,93,94,95,96,97,98,99],"api skill","zerion api skill",{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":20},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[],[86,83,114,84,85,87,88,62,90,66,91,92,93,94,95,96,97,98,99],"zerion api mcp",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[],[122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":20},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[],[122,123,125,149,150,151,152,153,154,133,155,156,157,158,159,160,161,162,99,140],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]