starwards-tdd

Enforce test-driven development for Starwards projects with Jest, Playwright, and Colyseus.

42|2|Updated Mar 17, 2019
One-click install
npx skills add https://github.com/starwards/starwards --skill starwards-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: starwards-tdd
Source: https://github.com/starwards/starwards/tree/main/.claude/skills/starwards-tdd
Command: npx skills add https://github.com/starwards/starwards --skill starwards-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jest, playwright, colyseus.

What problem does it solve?

Inconsistent testing practices lead to bugs, regressions, and unreliable code. This skill enforces a strict Test-Driven Development (TDD) workflow for Starwards, ensuring every piece of production code is backed by a failing-then-passing test.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Guides you through writing failing tests, implementing minimal code to pass, and then refactoring.
  • Starwards-Specific Testing: Covers Jest unit/integration tests, Playwright E2E tests, Colyseus state sync, and @gameField decorators.
  • Use Case: When adding a new ship system like a cloaking device, this skill ensures you write the failing test first, then implement the system, guaranteeing its functionality and preventing future bugs.

Quick Start

"I need to add a new cloaking device system. Guide me through the TDD process."

Frequently Asked Questions about starwards-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement test-driven development for a Starwards project?

Test-driven development for Starwards enforces writing failing tests first using Jest for units and Playwright for end-to-end, then implementing minimal code to pass. This workflow covers multiplayer state-sync with Colyseus, decorators, and UI components, ensuring every feature is backed by tests before production code exists.

Can I use Jest and Playwright together for Starwards testing?

Yes. Jest handles unit and integration tests for core modules and state-sync logic, while Playwright covers end-to-end testing for UI components. Used together in a TDD workflow, they enforce comprehensive test coverage across your Starwards codebase.

What does the red-green-refactor cycle mean in TDD?

Red-green-refactor is a test-first discipline: write a failing test (red), implement minimal code to pass it (green), then refactor for clarity. This cycle ensures production code is always validated by tests and prevents technical debt accumulation.

How do I test Colyseus state-sync patterns in Starwards?

Test-driven development for Starwards includes Jest integration tests for Colyseus state-sync logic, ensuring multiplayer state updates are validated before implementation. This guarantees reliable synchronization across game clients.

When should I use TDD for Starwards features?

TDD applies to all Starwards features: new ship systems, decorators, UI components, and multiplayer logic. It prevents regressions, catches bugs early, and enforces consistent quality across your codebase from the start.

What's the difference between Jest unit tests and Playwright end-to-end tests in TDD?

Jest unit and integration tests validate individual functions and state-sync logic in isolation, while Playwright end-to-end tests verify complete user workflows through the UI. Both are required in a comprehensive TDD strategy for Starwards.