This is the Gilded Rose kata in JavaScript with Jest
Install dependencies
npm install
This document outlines the commands used for various tasks in the project.
-
Run Tests: Run TypeScript compiler, ESLint, Prettier, and Jest tests.
npm run test
-
Watch Tests: Run TypeScript compiler and Jest tests in watch mode.
npm run test:watch
-
Test Coverage: Run TypeScript compiler and generate a test coverage report.
npm run test:coverage
-
Lint Code: Run ESLint using the Babel parser for linting.
npm run lint
-
Lint and Fix: Run ESLint using the Babel parser and automatically fix issues.
npm run lint:fix
- Format Code: Use Prettier to automatically format TypeScript files.
npm run format
- Build Docker Image: Build the Docker image for running tests.
docker build -t gilded-rose .
- Run Tests: Run the tests in the Docker container and remove the only this container when finished.
docker run -t -a=STDOUT gilded-rose npm run test:coverage && docker ps -a | grep "Exited" | awk '{print $1}' | xargs docker rm