Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andremw/gilded-rose-rescript
https://github.com/andremw/gilded-rose-rescript
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/andremw/gilded-rose-rescript
- Owner: andremw
- Created: 2023-09-10T10:03:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-29T11:35:18.000Z (about 1 year ago)
- Last Synced: 2024-11-08T09:06:02.876Z (2 months ago)
- Language: ReScript
- Size: 112 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gilded Rose
This is the Gilded Rose kata in Rescript with Jest. I copied the initial code from https://github.com/emilybache/GildedRose-Refactoring-Kata/tree/main/rescript.
This is my take on the refactoring.
Focus here is to have "atomic" commits and leverage Rescript's type system to make the code more reliable with successive small refactors.Up to commit #5adefec6, the refactor consists mostly of "strangling" the old application by catching the logic for each type of item with a switch case and handling them in the new code, which is safer and simpler than changing the old code.
## Getting started
Install dependencies
```sh
yarn install
```## Running tests
To run all tests
```sh
yarn test
```To run all tests in watch mode
```sh
yarn test:watch
```To start developing
```sh
yarn dev:rescript
```To run the TextTest file
```sh
yarn texttest [days]
```