mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 18:16:31 +00:00
21 lines
592 B
Markdown
21 lines
592 B
Markdown
|
# 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.
|
||
|
|