Skip to content

mathieudehaeck/gilded-tros

Repository files navigation

Gilded Tros Refactoring Kata

This Kata is based on the Gilded Rose Kata, originally created by Terry Hughes (http://twitter.com/TerryHughes). It is already on GitHub here. See also Bobby Johnson's description of the kata and this version with multiple languages. It was slightly rebranded by Axxes IT Consultancy, and renamed to Gilded Tros (with a wink to a local bar near the Axxes HQ ;).

How to use this Kata

The simplest way is to just clone the code and start hacking away improving the design. Instructions can be found in the REQUIREMENTS.MD document.

Have fun and good luck!

Getting Started

Prerequisites

  • Node.js: Version 22.19.0 or higher
  • nvm or n: Node version manager
  • pnpm: Version 10.29.3 or higher

Installation

# Set Node.js version
nvm use
# or
n auto

# Install dependencies
pnpm install

Available Commands

Build & Demo

# Build the project (compile TypeScript to JavaScript)
pnpm run build

# Run demo simulation directly with tsx (no build required)
pnpm run demo

# Run demo for custom number of days (e.g., 10 days)
pnpm run demo 10

Testing

# Run all tests
pnpm test

# Run tests in watch mode (auto-rerun on file changes)
pnpm run test:watch

# Run tests with coverage report
pnpm run test:coverage

# Open interactive UI for tests (modern test explorer)
pnpm run test:ui

Code Quality

# Check code quality (runs format + lint + type:check)
pnpm run check

# Run TypeScript type checking
pnpm run type:check

# Check code formatting
pnpm run format

# Auto-fix code formatting
pnpm run format:fix

# Check linting
pnpm run lint

# Auto-fix linting issues
pnpm run lint:fix

Tech Stack

  • TypeScript 5.9 - Modern TypeScript with strict mode
  • Vitest 4.0 - Lightning-fast test runner with native ESM support
  • tsx 4.21 - Run TypeScript directly without compilation
  • ESLint 9.39 - Modern flat config for code quality
  • Prettier 3.8 - Consistent code formatting
  • ESM - Native ES modules (type: "module")
  • Node.js 22 - LTS version with latest features

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors