[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79APVGJ6Z0YH8AKCCV2CKTC":3,"skill-same:01M79APVGJ6Z0YH8AKCCV2CKTC":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":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M79APVGJ6Z0YH8AKCCV2CKTC","vitest-testing",null,"Modern TypeScript\u002FJavaScript testing with Vitest. Fast unit and integration tests, native ESM support, Vite-powered HMR, and comprehensive mocking. Use for testing TS\u002FJS projects.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fvitest-testing\u002Fskills\u002Fvitest-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vitest-testing\ndescription: Modern TypeScript\u002FJavaScript testing with Vitest. Fast unit and integration tests, native ESM support, Vite-powered HMR, and comprehensive mocking. Use for testing TS\u002FJS projects.\nallowed-tools: Bash, Read, Edit, Write, Grep, Glob, TodoWrite\nlicense: MIT\n---\n\n# Vitest Testing\n\nExpert knowledge for testing JavaScript\u002FTypeScript projects using Vitest - a blazingly fast testing framework powered by Vite.\n\n## Quick Start\n\n### Installation\n\n```bash\n# Using Bun (recommended)\nbun add -d vitest\n\n# Using npm\nnpm install -D vitest\n```\n\n### Configuration\n\n```typescript\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig'\n\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'node', \u002F\u002F or 'jsdom'\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html'],\n      thresholds: { lines: 80, functions: 80, branches: 80 },\n    },\n    include: ['**\u002F*.{test,spec}.{js,ts,jsx,tsx}'],\n  },\n})\n```\n\n## Running Tests\n\n```bash\n# Run all tests (prefer bun)\nbun test\n\n# Watch mode (default)\nbun test --watch\n\n# Run once (CI mode)\nbun test --run\n\n# With coverage\nbun test --coverage\n\n# Specific file\nbun test src\u002Futils\u002Fmath.test.ts\n\n# Pattern matching\nbun test --grep=\"calculates sum\"\n\n# UI mode (interactive)\nbun test --ui\n\n# Verbose output\nbun test --reporter=verbose\n```\n\n## Writing Tests\n\n### Basic Structure\n\n```typescript\nimport { describe, it, expect, beforeEach, afterEach } from 'vitest'\nimport { add, subtract } from '.\u002Fmath'\n\ndescribe('Math utilities', () => {\n  beforeEach(() => {\n    \u002F\u002F Setup before each test\n  })\n\n  it('adds two numbers correctly', () => {\n    expect(add(2, 3)).toBe(5)\n  })\n\n  it('subtracts two numbers correctly', () => {\n    expect(subtract(5, 3)).toBe(2)\n  })\n})\n```\n\n### Parametrized Tests\n\n```typescript\ndescribe.each([\n  { input: 2, expected: 4 },\n  { input: 3, expected: 9 },\n])('square function', ({ input, expected }) => {\n  it(`squares ${input} to ${expected}`, () => {\n    expect(square(input)).toBe(expected)\n  })\n})\n```\n\n## Assertions\n\n```typescript\n\u002F\u002F Equality\nexpect(value).toBe(expected)\nexpect(value).toEqual(expected)\n\n\u002F\u002F Truthiness\nexpect(value).toBeTruthy()\nexpect(value).toBeNull()\nexpect(value).toBeDefined()\n\n\u002F\u002F Numbers\nexpect(number).toBeGreaterThan(3)\nexpect(number).toBeCloseTo(0.3, 1)\n\n\u002F\u002F Strings\u002FArrays\nexpect(string).toMatch(\u002Fpattern\u002F)\nexpect(array).toContain(item)\n\n\u002F\u002F Objects\nexpect(object).toHaveProperty('key')\nexpect(object).toMatchObject({ a: 1 })\n\n\u002F\u002F Exceptions\nexpect(() => throwError()).toThrow('message')\n\n\u002F\u002F Promises\nawait expect(promise).resolves.toBe(value)\nawait expect(promise).rejects.toThrow()\n```\n\n## Mocking\n\n### Function Mocks\n\n```typescript\nimport { vi } from 'vitest'\n\nconst mockFn = vi.fn()\nmockFn.mockReturnValue(42)\nmockFn.mockResolvedValue('async result')\nmockFn.mockImplementation((x) => x * 2)\n\nexpect(mockFn).toHaveBeenCalled()\nexpect(mockFn).toHaveBeenCalledWith('arg')\n```\n\n### Module Mocking\n\n```typescript\nvi.mock('.\u002Fapi', () => ({\n  fetchUser: vi.fn(() => ({ id: 1, name: 'Test User' })),\n}))\n\nimport { fetchUser } from '.\u002Fapi'\n\nbeforeEach(() => {\n  vi.clearAllMocks()\n})\n```\n\n### Timers\n\n```typescript\nbeforeEach(() => vi.useFakeTimers())\nafterEach(() => vi.restoreAllMocks())\n\nit('advances timers', () => {\n  const callback = vi.fn()\n  setTimeout(callback, 1000)\n  vi.advanceTimersByTime(1000)\n  expect(callback).toHaveBeenCalledOnce()\n})\n\nit('mocks dates', () => {\n  const date = new Date('2024-01-01')\n  vi.setSystemTime(date)\n  expect(Date.now()).toBe(date.getTime())\n})\n```\n\n## Coverage\n\n```bash\n# Generate coverage report\nbun test --coverage\n\n# HTML report\nbun test --coverage --coverage.reporter=html\nopen coverage\u002Findex.html\n\n# Check against thresholds\nbun test --coverage --coverage.thresholds.lines=90\n```\n\n## Integration Testing\n\n```typescript\nimport request from 'supertest'\nimport { app } from '.\u002Fapp'\n\ndescribe('API endpoints', () => {\n  it('creates a user', async () => {\n    const response = await request(app)\n      .post('\u002Fapi\u002Fusers')\n      .send({ name: 'John' })\n      .expect(201)\n\n    expect(response.body).toMatchObject({\n      id: expect.any(Number),\n      name: 'John',\n    })\n  })\n})\n```\n\n## Best Practices\n\n- One test file per source file: `math.ts` → `math.test.ts`\n- Group related tests with `describe()` blocks\n- Use descriptive test names\n- Mock only external dependencies\n- Use `concurrent` tests for independent async tests\n- Share expensive fixtures with `beforeAll()`\n- Aim for 80%+ coverage but don't chase 100%\n\n## See Also\n\n- `test-quality-analysis` - Detecting test smells\n- `playwright-testing` - E2E testing\n- `mutation-testing` - Validate test effectiveness\n","# Vitest Testing\n\nExpert knowledge for testing JavaScript\u002FTypeScript projects using Vitest - a blazingly fast testing framework powered by Vite.\n\n## Quick Start\n\n### Installation\n\n```bash\n# Using Bun (recommended)\nbun add -d vitest\n\n# Using npm\nnpm install -D vitest\n```\n\n### Configuration\n\n```typescript\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig'\n\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'node', \u002F\u002F or 'jsdom'\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html'],\n      thresholds: { lines: 80, functions: 80, branches: 80 },\n    },\n    include: ['**\u002F*.{test,spec}.{js,ts,jsx,tsx}'],\n  },\n})\n```\n\n## Running Tests\n\n```bash\n# Run all tests (prefer bun)\nbun test\n\n# Watch mode (default)\nbun test --watch\n\n# Run once (CI mode)\nbun test --run\n\n# With coverage\nbun test --coverage\n\n# Specific file\nbun test src\u002Futils\u002Fmath.test.ts\n\n# Pattern matching\nbun test --grep=\"calculates sum\"\n\n# UI mode (interactive)\nbun test --ui\n\n# Verbose output\nbun test --reporter=verbose\n```\n\n## Writing Tests\n\n### Basic Structure\n\n```typescript\nimport { describe, it, expect, beforeEach, afterEach } from 'vitest'\nimport { add, subtract } from '.\u002Fmath'\n\ndescribe('Math utilities', () => {\n  beforeEach(() => {\n    \u002F\u002F Setup before each test\n  })\n\n  it('adds two numbers correctly', () => {\n    expect(add(2, 3)).toBe(5)\n  })\n\n  it('subtracts two numbers correctly', () => {\n    expect(subtract(5, 3)).toBe(2)\n  })\n})\n```\n\n### Parametrized Tests\n\n```typescript\ndescribe.each([\n  { input: 2, expected: 4 },\n  { input: 3, expected: 9 },\n])('square function', ({ input, expected }) => {\n  it(`squares ${input} to ${expected}`, () => {\n    expect(square(input)).toBe(expected)\n  })\n})\n```\n\n## Assertions\n\n```typescript\n\u002F\u002F Equality\nexpect(value).toBe(expected)\nexpect(value).toEqual(expected)\n\n\u002F\u002F Truthiness\nexpect(value).toBeTruthy()\nexpect(value).toBeNull()\nexpect(value).toBeDefined()\n\n\u002F\u002F Numbers\nexpect(number).toBeGreaterThan(3)\nexpect(number).toBeCloseTo(0.3, 1)\n\n\u002F\u002F Strings\u002FArrays\nexpect(string).toMatch(\u002Fpattern\u002F)\nexpect(array).toContain(item)\n\n\u002F\u002F Objects\nexpect(object).toHaveProperty('key')\nexpect(object).toMatchObject({ a: 1 })\n\n\u002F\u002F Exceptions\nexpect(() => throwError()).toThrow('message')\n\n\u002F\u002F Promises\nawait expect(promise).resolves.toBe(value)\nawait expect(promise).rejects.toThrow()\n```\n\n## Mocking\n\n### Function Mocks\n\n```typescript\nimport { vi } from 'vitest'\n\nconst mockFn = vi.fn()\nmockFn.mockReturnValue(42)\nmockFn.mockResolvedValue('async result')\nmockFn.mockImplementation((x) => x * 2)\n\nexpect(mockFn).toHaveBeenCalled()\nexpect(mockFn).toHaveBeenCalledWith('arg')\n```\n\n### Module Mocking\n\n```typescript\nvi.mock('.\u002Fapi', () => ({\n  fetchUser: vi.fn(() => ({ id: 1, name: 'Test User' })),\n}))\n\nimport { fetchUser } from '.\u002Fapi'\n\nbeforeEach(() => {\n  vi.clearAllMocks()\n})\n```\n\n### Timers\n\n```typescript\nbeforeEach(() => vi.useFakeTimers())\nafterEach(() => vi.restoreAllMocks())\n\nit('advances timers', () => {\n  const callback = vi.fn()\n  setTimeout(callback, 1000)\n  vi.advanceTimersByTime(1000)\n  expect(callback).toHaveBeenCalledOnce()\n})\n\nit('mocks dates', () => {\n  const date = new Date('2024-01-01')\n  vi.setSystemTime(date)\n  expect(Date.now()).toBe(date.getTime())\n})\n```\n\n## Coverage\n\n```bash\n# Generate coverage report\nbun test --coverage\n\n# HTML report\nbun test --coverage --coverage.reporter=html\nopen coverage\u002Findex.html\n\n# Check against thresholds\nbun test --coverage --coverage.thresholds.lines=90\n```\n\n## Integration Testing\n\n```typescript\nimport request from 'supertest'\nimport { app } from '.\u002Fapp'\n\ndescribe('API endpoints', () => {\n  it('creates a user', async () => {\n    const response = await request(app)\n      .post('\u002Fapi\u002Fusers')\n      .send({ name: 'John' })\n      .expect(201)\n\n    expect(response.body).toMatchObject({\n      id: expect.any(Number),\n      name: 'John',\n    })\n  })\n})\n```\n\n## Best Practices\n\n- One test file per source file: `math.ts` → `math.test.ts`\n- Group related tests with `describe()` blocks\n- Use descriptive test names\n- Mock only external dependencies\n- Use `concurrent` tests for independent async tests\n- Share expensive fixtures with `beforeAll()`\n- Aim for 80%+ coverage but don't chase 100%\n\n## See Also\n\n- `test-quality-analysis` - Detecting test smells\n- `playwright-testing` - E2E testing\n- `mutation-testing` - Validate test effectiveness\n",{"name":5,"license":15,"description":7,"allowed-tools":24},"Bash, Read, Edit, Write, Grep, Glob, TodoWrite","main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fvitest-testing\u002Fskills\u002Fvitest-testing","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill vitest-testing",{"tool":37,"command":38},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill vitest-testing",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill vitest-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fvitest-testing\u002Fskills\u002Fvitest-testing\u002FSKILL.md",true,[],[46,54,61,68,75,82],{"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":50,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":50,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":50,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":50,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":50,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":50,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]