Skip to content

Commit c2ab542

Browse files
adding coverage transcript (#1537)
Co-authored-by: Phil Hawksworth <phil@deno.com>
1 parent 808ddcf commit c2ab542

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

examples/videos/deno_coverage.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,39 @@ url: /examples/deno_coverage/
44
videoUrl: https://www.youtube.com/watch?v=P2BBYNPpgW8
55
layout: video.tsx
66
---
7+
8+
## Description of video
9+
10+
We updated `deno coverage` in 1.39 with a better output and HTML generation.
11+
12+
## Transcript and code
13+
14+
If you're using `deno test`, have you checked out `deno coverage`?
15+
16+
`deno coverage` is a great way to see how much test coverage you have, just add
17+
the coverage flag to Deno test:
18+
19+
```sh
20+
deno test --coverage
21+
```
22+
23+
This will save coverage data to `/coverage`. Then run the coverage command:
24+
25+
```sh
26+
deno coverage ./coverage
27+
```
28+
29+
to see a coverage report.
30+
31+
In Deno 1.39, `deno coverage` was updated in two ways; first it now outputs a
32+
concise summary table and second, if you add the `--html` flag:
33+
34+
```sh
35+
deno coverage ./coverage --html
36+
```
37+
38+
the coverage tool generates static HTML so that you can explore your coverage in
39+
a browser.
40+
41+
We got more plans for Deno coverage, like simplifying the steps into a single
42+
command and more.

0 commit comments

Comments
 (0)