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:
- Individual item properties daily change rules: click here
Clone repo
git clone https://github.com/44jovi/gilded-rose-js.git
Install dependencies
npm install
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.
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