forked from jestjs/jest
/
coverageReport.test.ts.snap
140 lines (127 loc) Β· 9.33 KB
/
coverageReport.test.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`collects coverage from duplicate files avoiding shared cache 1`] = `
---------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
a | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
b | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
---------------|---------|----------|---------|---------|-------------------
`;
exports[`collects coverage only from multiple specified files 1`] = `
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
file.js | 100 | 100 | 100 | 100 |
otherFile.js | 100 | 100 | 100 | 100 |
--------------|---------|----------|---------|---------|-------------------
`;
exports[`collects coverage only from specified file 1`] = `
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
file.js | 100 | 100 | 100 | 100 |
----------|---------|----------|---------|---------|-------------------
`;
exports[`collects coverage only from specified files avoiding dependencies 1`] = `
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 87.5 | 100 | 50 | 100 |
sum.js | 87.5 | 100 | 50 | 100 |
----------|---------|----------|---------|---------|-------------------
`;
exports[`does not output coverage report when html is requested 1`] = ``;
exports[`generates coverage when using the testRegex config param 1`] = `
-------------------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19
otherFile.js | 100 | 100 | 100 | 100 |
sum.js | 87.5 | 100 | 50 | 100 |
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
-------------------------------------|---------|----------|---------|---------|-------------------
`;
exports[`json reporter printing with --coverage 1`] = `
Test Suites: 1 failed, 1 total
Tests: 1 failed, 2 passed, 3 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites.
`;
exports[`outputs coverage report 1`] = `
-------------------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19
otherFile.js | 100 | 100 | 100 | 100 |
sum.js | 87.5 | 100 | 50 | 100 |
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
-------------------------------------|---------|----------|---------|---------|-------------------
`;
exports[`outputs coverage report when text and text-summary is requested 1`] = `
=============================== Coverage summary ===============================
Statements : 60% ( 15/25 )
Branches : 0% ( 0/4 )
Functions : 50% ( 3/6 )
Lines : 60% ( 12/20 )
================================================================================
-------------------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19
otherFile.js | 100 | 100 | 100 | 100 |
sum.js | 87.5 | 100 | 50 | 100 |
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
-------------------------------------|---------|----------|---------|---------|-------------------
`;
exports[`outputs coverage report when text is requested 1`] = `
-------------------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19
otherFile.js | 100 | 100 | 100 | 100 |
sum.js | 87.5 | 100 | 50 | 100 |
sumDependency.js | 0 | 0 | 0 | 0 | 8,10,12
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
identical.js | 100 | 100 | 100 | 100 |
-------------------------------------|---------|----------|---------|---------|-------------------
`;
exports[`outputs coverage report when text-summary is requested 1`] = `
=============================== Coverage summary ===============================
Statements : 60% ( 15/25 )
Branches : 0% ( 0/4 )
Functions : 50% ( 3/6 )
Lines : 60% ( 12/20 )
================================================================================
`;