Skip to content

πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» A kata template for Test-Commit-Revert (TCR)

License

Notifications You must be signed in to change notification settings

andrej-dyck/kata-template-tcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kata Template for Test-Commit-Revert (TCR)

Here's the original idea of test && commit || revert by Kent Beck.

This is a starter project for a coding kata using test && commit || revert and TypeScript; where TCR is enforced as a Git pre-commit hook.

Note: If you want support for more languages, have a look at joejag/tcr-starters by Joe Wright.

Note: Although, this kata template is using a pre-commit hook, the use of pre-commit hooks has major downsides and is often a focus on the "wrong thing"; cf. Pre-commit: Don't git hooked! by Matt Riley.

Setup

  1. Checkout this repository (or use this template to create a new one)
  2. Install dependencies with npm i, pnpm i, or yarn install (Husky hooks should be installed)

How to Use

  • Choose a kata; e.g.,
  • Commit often
    • Use Git as you are used to (the pre-commit hook will be executed)
    • Use npm run tcr to commit (it will execute test && commit || revert)
    • Use npm run tcr-timeboxed 5 to continuously test && commit || revert in 5 minute intervalls
      • combine the exercise with npm run tcr or npm run tc (without reset) to commit early
      • cancel with ctrl+c

About

πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» A kata template for Test-Commit-Revert (TCR)

Topics

Resources

License

Stars

Watchers

Forks