https://github.com/obsfx/gilded-rose-refactoring-case
https://github.com/obsfx/gilded-rose-refactoring-case
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/obsfx/gilded-rose-refactoring-case
- Owner: obsfx
- Created: 2022-07-31T05:03:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-31T12:42:03.000Z (almost 4 years ago)
- Last Synced: 2025-01-13T22:18:52.903Z (over 1 year ago)
- Language: TypeScript
- Size: 98.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gilded Rose Refactoring Case
This is my approach on refactoring the Gilded Rose kata in TypeScript.
## Getting started
Clone the repository and navigate to the directory.
```sh
git clone git@github.com:obsfx/gilded-rose-refactoring-case.git && cd ./gilded-rose-refactoring-case
```
Install dependencies.
```sh
npm install
```
## Running app
```sh
npx ts-node test/golden-master-text-test.ts
```
Or with number of days as args:
```sh
npx ts-node test/golden-master-text-test.ts 10
```
## Running tests
To run all tests.
```sh
npm run test:jest
```
To run all tests in watch mode
```sh
npm run test:jest:watch
```
---
In this case study, I did not touch the initially created entry point of the app. I mainly focused on writing tests to ensure we were not breaking previous functionality while refactoring the code and adding the new feature. So most of the changes happened in the `./app` directory and the `./test/jest/gilded-rose.spec.ts` file.