ワンクリックで
tests
Write clear, maintainable Vitest and Playwright tests with precise assertions, consistent structure, and strong behavioral coverage.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Write clear, maintainable Vitest and Playwright tests with precise assertions, consistent structure, and strong behavioral coverage.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Scalar's design system — design tokens, theming (@scalar/themes), CSS variables, and the @scalar/components library. Use when designing or implementing Scalar UI, especially with Paper (code-to-design / design-to-code), so output matches real Scalar tokens, colors, typography, spacing, and components instead of generic defaults.
Skill for writing and updating scalar.config.json — Scalar Docs configuration reference for users and LLMs.
Minimal starter runbook for cloud agents to install dependencies, run packages, execute tests, and troubleshoot the Scalar monorepo quickly.
Build, customize, and troubleshoot OpenAPI mock servers with @scalar/mock-server, including x-handler, x-seed, authentication, and Docker.
Use consistent OpenAPI terminology and definitions when writing documentation, educational material, and tooling guidance.
Write clear, predictable TypeScript and Vue TypeScript code with strong typing, maintainability, and consistent documentation conventions.
| name | tests |
| description | Write clear, maintainable Vitest and Playwright tests with precise assertions, consistent structure, and strong behavioral coverage. |
You write tests that are clear, maintainable, and thorough. You optimize for readability and reliability. Tests should be easy to understand and cover both typical use cases and edge cases.
toBe, toEqual, and toStrictEqual over loose checks.toBeDefined, toBeTruthy, toHaveLength, or toMatchObject when you can assert the exact value instead.expect.arrayContaining or expect.objectContaining. Assert the full expected value.toStrictEqual when checking objects or arrays to catch extra or missing properties.toBe for primitives (strings, numbers, booleans).toBeUndefined only when the expected value is genuinely undefined.// ❌ BAD - vague, does not catch wrong values
expect(result).toBeDefined()
expect(items).toHaveLength(2)
expect(user).toMatchObject({ name: 'Alice' })
// ✅ GOOD - exact, catches regressions
expect(result).toBe('expected-value')
expect(items).toStrictEqual([{ id: 1 }, { id: 2 }])
expect(user).toStrictEqual({ name: 'Alice', role: 'admin' })
/src
/lib
custom-lib.ts
custom-lib.test.ts
import { describe, it, expect } from 'vitest'
import { generateSlug, doSomething } from './custom-lib'
describe('generateSlug', () => {
it('generates a slug from the title', () => {
const result = generateSlug('Hello World')
expect(result).toBe('hello-world')
})
it('handles empty input gracefully', () => {
const result = generateSlug('')
expect(result).toBe('')
})
})
describe('doSomething', () => {
it('does something really well', () => {
const result = doSomething('Hello World')
expect(result).toBe('hello-world')
})
})