majiayu000/claude-skill-registry-data/typescript-testing-cooldaemon-dotfiles

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Tainted

Author "majiayu000" has blocked skill(s)

Jest and Vitest testing policies for TypeScript/JavaScript. Use when writing or reviewing TS/JS test code. Do NOT use for application code -- use typescript-patterns instead.

Install

npx vskill@latest install majiayu000/claude-skill-registry-data/typescript-testing-cooldaemon-dotfiles

SKILL.md

TypeScript/JavaScript Testing Policies

Test Structure (AAA Pattern)

typescript
describe('UserService', () => {
describe('createUser', () => {
it('creates user with valid input', async () => {
// Arrange
const input = { name: 'Alice', email: 'alice@example.com' }
// Act
const user = await userService.createUser(input)
// Assert
expect(user.id).toBeDefined()
})
})
})

Mocking Policies

Mock Cleanup (REQUIRED)
typescript
afterEach(() => {
jest.clearAllMocks() // Vitest: vi.clearAllMocks()
jest.restoreAllMocks() // Vitest: vi.restoreAllMocks()
})
Prefer spyOn Over Full Mocks
typescript
// GOOD: Spy on specific method
const spy = jest.spyOn(service, 'save')
// AVOID: Full module mock when not needed
jest.mock('./service')

Async Testing

typescript
// Use async/await
it('fetches data', async () => {
const data = await fetchData()
expect(data).toBeDefined()
})
// Use rejects for error cases
await expect(fetchData()).rejects.toThrow('Network error')

Coverage Targets

MetricTarget
Lines80%+
Branches80%+
Functions80%+

Commands

See `makefile-first` skill for command execution policy.

Vitest Bench

bash
vitest bench # Run all benchmarks
vitest bench --reporter=verbose # Detailed output
When to Write Benchmarks
  • Comparing alternative implementations (data structures, algorithms)
  • Validating that an optimization actually improved performance
  • Establishing baseline for performance-critical paths
  • Preventing regression in hot paths
Benchmark Options
typescript
bench('operation', () => { /* code */ }, {
time: 1000, // ms to run (default: 100)
iterations: 100, // minimum iterations
warmupTime: 200, // warmup before measuring
})

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
23
Repository forks
8
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/majiayu000/claude-skill-registry-data/typescript-testing-cooldaemon-dotfiles/badge)](https://verified-skill.com/skills/majiayu000/claude-skill-registry-data/typescript-testing-cooldaemon-dotfiles)

Something wrong with this skill or its page? Tell us.