Index of every page on this site: llms.txt
All skills
corey-alix avatar

/testing-strategy

@e4fbc1d
Run it yourself

Advises on appropriate testing approaches, recommends testing levels, and ensures comprehensive test coverage for business logic and edge cases.

  • 1 file
  • 3.9 KB
  • Updated 9 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/corey-alix/dwp-hours/testing-strategy

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈41 tokens for metadata: the name and description. ≈956 when used: this file.

Description uses 2.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈163 characters, or 2.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Testing Strategy Advisor

Description

Advises on appropriate testing approaches, recommends testing levels, and ensures comprehensive test coverage for business logic and edge cases.

Trigger

Activated when users mention testing, validation, or quality assurance needs.

Comprehensive Validation Pipeline

When implementing code changes, follow this validation sequence:

  1. Build Validation: npm run build - Ensure TypeScript compilation succeeds
  2. Lint Validation: npm run lint - Check code quality and style compliance
  3. Unit Test Validation: npm run test:unit - Verify business logic integrity
  4. E2E Test Validation: npm run test:e2e - Confirm end-to-end functionality
  5. Documentation Update: Update relevant TASKS files and READMEs

Test File Convention Investigation:

  • Use git log to identify when violations were introduced
  • Use grep patterns to find violations across multiple files
  • Audit HTML files for inline attributes vs programmatic setup
  • Validate that seedData.ts contains required test data

Refactoring Safety:

  • Changes affecting only code organization (not functionality) can skip extensive manual testing
  • Always run full test suite to catch unexpected side effects
  • Update task documentation to reflect completed work

Test File Convention Enforcement

Ensure test files follow web-components-assistant guidelines:

  • HTML Files: Must NOT contain inline attributes on web components
  • TypeScript Files: Handle all data and configuration programmatically
  • Data Sources: Use seedData.ts for consistent test data
  • Strong Typing: Unit tests should NOT cast components to any, but instead rely on proper TypeScript interfaces and component APIs
  • Validation: Run build + lint + tests after refactoring

Pattern: HTML defines structure, TypeScript sets properties via setAttribute() or direct assignment.

Test File Design Constraints:

  • test.html: Contains declarative HTML structure only. Imports from /app.js and calls aliased playground functions. No inline JavaScript for component setup.
  • test.ts: Acts as component controller. Does NOT inject HTML markup. All DOM manipulation is programmatic using component APIs. Follows web component patterns where HTML is declarative and TypeScript handles behavior.

Response Pattern

  1. Suggest appropriate testing level (unit/integration/E2E) based on the feature
  2. Reference Vitest for unit tests, Playwright for E2E tests
  3. Provide testing patterns used in the existing codebase
  4. Ensure test coverage for business logic and edge cases
  5. Recommend manual testing steps for UI features
  6. Include build and lint validation as part of testing strategy

Testing Insights

E2E Testing for Component Integration

  • Component Behavior Testing: E2E tests excel at validating component integration and user workflows
  • Calendar Interaction Testing: Use Playwright locators to test calendar day selection and tooltip behavior
  • Data Rendering Validation: Test that components properly render fetched data in calendar views
  • Build Validation: Always run npm run build && npm run lint before E2E tests to catch compilation issues

Test Coverage Strategy

  • Unit Tests: Business logic, validation functions, utility methods
  • E2E Tests: Component integration, user workflows, data rendering
  • Build Tests: TypeScript compilation, linting, bundle generation

Examples

  • "How should I test this PTO calculation function?"
  • "What tests do I need for this API endpoint?"
  • "How do I test the admin panel functionality?"

Additional Context

This skill promotes the project's testing standards using Vitest for unit tests and Playwright for E2E tests, ensuring comprehensive coverage of business logic.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at e4fbc1d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Dormantupdated 9 months ago

README badge

README badge for corey-alix/dwp-hours/testing-strategy