https://github.com/err0r500/tdd-cli
https://github.com/err0r500/tdd-cli
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/err0r500/tdd-cli
- Owner: err0r500
- Created: 2024-06-22T19:58:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-28T19:54:00.000Z (about 2 years ago)
- Last Synced: 2024-06-29T03:02:52.790Z (about 2 years ago)
- Language: Roc
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TDD cli
This project aims to gamify a TDD session by scoring it. Invoke the CLI to run your tests, it will score your move a store it locally until your kata is complete.
You can always see your current score using the `--score` flag.
Your TDD session is stored in the `./session.json` file, delete it to start a fresh session.
## Set up your project
The CLI looks for a `tdd.json` file in your current folder.
It must look like this :
```json
{
"testCommand": "",
"controlCommand": ""
}
```
you can have a look at the [typescript example](./_examples/typescript)
### user tests command
- exit with 0 when all tests passed,
- exit with 1 when a test failed,
### control tests command
```
{
"passingTestsCount": number,
"totalTestsCount": number,
}
```
## Tips
### NPM & Jest
- run `npm` & `jest` with the `--silent` flag to minimize the chance of getting a messed up json output
### jq
- run `jq` with the `-c` flag to output on a single line
---
## dev notes
### run roc from example folder
```
roc dev ../../src/main.roc
```