slige/surveys/code_coverage/README.md

21 lines
592 B
Markdown
Raw Permalink Normal View History

2024-11-21 15:16:30 +00:00
# Code coverage survery
## Test
```
deno task test-coverage
```
## Instructions
Write 1) a test inside `program_1_test.ts`, testing `playerFromUnknown` and 2) a test inside `program_2_test.ts`, testing `stringToInt`. The goal should be to __test as much as the code as possible__, meaning every branch and every line of code should be tested.
The tests are done, when the participant is satisfied (or the time is up). Afterward, generate a coverage report using the following command.
```sh
deno task test-coverage
```
Note down the branch and line coverage percentages of each file.