Skip to content

Commit 399b31e

Browse files
committed
update readme
1 parent 82743fc commit 399b31e

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ npx pythagora --unit-tests --func <FUNCTION_NAME>
2626

2727
Where `<FUNCTION_NAME>` is the name of the function you want to generate unit tests for. Just make sure that your function is exported from a file. You can see other options like generating tests for multiple files or folders [below in the Options section](#-options).
2828

29-
<br>
29+
<br><br>
30+
If you wish to expand your current test suite with more tests to get better code coverage you can run:
31+
32+
```bash
33+
npx pythagora --expand-unit-tests --path <PATH_TO_YOUR_TEST_SUITE>
34+
```
35+
for more details on expanding existing tests see [below in the Expanding existing tests section](#-expand-existing-tests).
36+
37+
<br><br>
3038

3139
**NOTE:** on Windows make sure to run all commands using `Git Bash` and not `Power Shell` or anything similiar
3240

@@ -77,6 +85,16 @@ When Pythagora generates unit tests, it uses the following approach:
7785

7886
<br>
7987

88+
# 📈 Expand existing tests
89+
If you already have generated tests for your codebase but you just want to increase your code coverage or cover more edge cases, simply run:
90+
91+
```bash
92+
npx pythagora --expand-unit-tests --path <PATH_TO_YOUR_TEST_SUITE>
93+
```
94+
When running command `PATH_TO_YOUR_TEST_SUITE` can be path to a single test file or to a folder and all test files inside of that folder will be processed and expanded.
95+
96+
That's all, enjoy your new code coverage!
97+
8098
# 📖 Options
8199
- To generate unit tests for **one single function**, run:
82100

0 commit comments

Comments
 (0)