Skip to content

The famous Gilded Rose Polymorphism tech test in JS and 100% test coverage.

Notifications You must be signed in to change notification settings

44jovi/gilded-rose-js

Repository files navigation

Gilded Rose - Refactoring Kata / Challenge


My work on the famous "Gilded Rose" tech test / refactoring kata.

  • Language / Tools

    • JavaScript
    • Jest
  • Objectives

    • Use a TDD / OOP approach
    • Make it easy to add new shop items
    • Focus on high code quality
      • Readability
      • Reliability
      • Extensibility
  • Orginal Specifications

    • Link
    • Also available in the root directory:
      /GildedRoseRequirements.txt
  • Credit and thanks to emilybache for the base legacy code available in virtually all programming languages:

Design / Planning

Screenshot

Items rules planning

  • Individual item properties daily change rules: click here

Testing

Screenshot

Getting started

Clone repo

git clone https://github.com/44jovi/gilded-rose-js.git

Install dependencies

npm install

Demo

To run the demo script

node test/test_scripts/script.js

It is adapted from the original texttest_fixture.js with added items to demonstrate the updated code working.

Running tests

To run all tests

npm test

To run all tests in watch mode

npm run test:watch

To generate test coverage report

npm run test:coverage

To run the linter (eslint)

npm run test:lint

About

The famous Gilded Rose Polymorphism tech test in JS and 100% test coverage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published