Skip to content
OpenSmartRoute
Skillv1.0.0

testing

Testing best practices including unit testing, integration testing, E2E testing with Playwright, and test writing guidelines for TypeScript.

by ReaperOAK(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from ReaperOAK/ForgeOS (plugin/forgeos/skills/testing/SKILL.md). Install upstream with npx skills add ReaperOAK/ForgeOS --skill testing. Copyright stays with the author.

Overview

Testing best practices including unit testing, integration testing, E2E testing with Playwright, and test writing guidelines for TypeScript.

Testing Best Practices

When to Use

  • Writing unit tests for new code
  • Creating integration tests for APIs
  • Setting up E2E tests with Playwright
  • Following TDD red-green-refactor cycle

Test Types

  1. Unit Tests — Test individual functions/methods in isolation
  2. Integration Tests — Test component interactions and API endpoints
  3. E2E Tests — Test complete user flows with Playwright
  4. Mutation Tests — Verify test quality by introducing mutations

Key Practices

  • Arrange-Act-Assert pattern
  • Test edge cases and error scenarios
  • Mock external dependencies
  • Descriptive test names: should [expected behavior] when [condition]

Resources

See the ../qa/references/ directory for:

  • QA Best Practices and Strategy Guide (chunks 1-4)
  • QA Agent reference (chunks 1-2)
  • Playwright testing guide
  • Test writing guidelines

Rules

  • Follow the conventions defined in this skill
  • Apply these patterns consistently across all relevant code

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/reaperoak-forgeos-testing/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

reaperoak-forgeos-testing.ocm.jsonjson
{
  "ocm": "1",
  "id": "reaperoak-forgeos-testing",
  "kind": "skill",
  "name": "testing",
  "description": "Testing best practices including unit testing, integration testing, E2E testing with Playwright, and test writing guidelines for TypeScript.",
  "publisher": "ReaperOAK",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "testing",
      "playwright",
      "unit-test",
      "integration",
      "e2e",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Testing best practices including unit testing, integration testing, E2E testing with Playwright, and test writing guidelines for TypeScript."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/ReaperOAK/ForgeOS",
      "path": "plugin/forgeos/skills/testing/SKILL.md",
      "ref": "419c876714000b1f719ff722c0fee576421b4d0a",
      "url": "https://github.com/ReaperOAK/ForgeOS/blob/419c876714000b1f719ff722c0fee576421b4d0a/plugin/forgeos/skills/testing/SKILL.md",
      "key": "ReaperOAK/ForgeOS/plugin/forgeos/skills/testing/SKILL.md"
    }
  },
  "instructions": "## Overview\n\nTesting best practices including unit testing, integration testing, E2E testing with Playwright, and test writing guidelines for TypeScript.\n\n\n# Testing Best Practices\n\n## When to Use\n- Writing unit tests for new code\n- Creating integration tests for APIs\n- Setting up E2E tests with Playwright\n- Following TDD red-green-refactor cycle\n\n## Test Types\n1. **Unit Tests** — Test individual functions/methods in isolation\n2. **Integration Tests** — Test component interactions and API endpoints\n3. **E2E Tests** — Test complete user flows with Playwright\n4. **Mutation Tests** — Verify test ",
  "cost": {
    "context_tokens": 283
  }
}

Fetch it by URL: GET /api/v1/registry/reaperoak-forgeos-testing/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.