File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,39 @@ url: /examples/deno_coverage/
4
4
videoUrl : https://www.youtube.com/watch?v=P2BBYNPpgW8
5
5
layout : video.tsx
6
6
---
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.
You can’t perform that action at this time.
0 commit comments