Table of Contents
This is a template repository focused for practicing katas. Has the basics for start working with TDD.
You can also use this template for practicing some design patterns or just as a sandbox for testing an idea.
Create your new repository using this as template and once you have your repository cloned on your pc just run npm install
on the repository root folder for installing all the dependencies.
# Run it on the repository root folder
npm install
npm run test:watch
This template come with a handful list of scripts:
"build"
: build the project using TypeScript. The output directory is/build
."lint"
: Run eslint following standard rules."lint:fix"
: Fix all simple fixes as spaces, quotes and stuff like that."prestart"
: Trigger build every time you runnpm start
.- ️
"start"
: Runbuild/index.js
. A build is generated right before running triggered by"prestart"
script.. - ️
"test"
: Run all test insrc
with vitest. - ️
"test:coverage"
: Run test coverage. - ️
"test:watch"
: Run all test insrc
and keep watching for file changes. - ️
"test:watch:ui"
: Same as"test:watch"
, but run a web server for checking test results on a browser.
The idea is to use mostly the scripts starting with test
. You can use the lint
scripts or let your IDE use the .eslintrc.json
config.