monocart-coverage-reports 2.5.9 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +1,43 @@
1
- const Util = require('../utils/util.js');
2
- module.exports = class InfoStatement {
3
- constructor(data, original) {
4
- const {
5
- start, end, count
6
- } = data;
7
-
8
- this.start = start;
9
- this.end = end;
10
- this.count = count;
11
- this.data = data;
12
- this.original = original;
13
- }
14
-
15
- getRange() {
16
- const range = {
17
- start: this.start,
18
- end: this.end,
19
- count: this.count
20
- };
21
- if (this.ignored) {
22
- range.ignored = true;
23
- }
24
- // for debug
25
- if (Util.isDebug() && this.original) {
26
- range.generatedStart = this.data.generatedStart;
27
- range.generatedEnd = this.data.generatedEnd;
28
- }
29
- return range;
30
- }
31
-
32
- generate(locator) {
33
-
34
- const loc = {
35
- start: this.start,
36
- end: this.end
37
- };
38
-
39
- Util.updateOffsetToLocation(locator, loc);
40
-
41
- return loc;
42
- }
43
- };
1
+ const Util = require('../utils/util.js');
2
+ module.exports = class InfoStatement {
3
+ constructor(data, original) {
4
+ const {
5
+ start, end, count
6
+ } = data;
7
+
8
+ this.start = start;
9
+ this.end = end;
10
+ this.count = count;
11
+ this.data = data;
12
+ this.original = original;
13
+ }
14
+
15
+ getRange() {
16
+ const range = {
17
+ start: this.start,
18
+ end: this.end,
19
+ count: this.count
20
+ };
21
+ if (this.ignored) {
22
+ range.ignored = true;
23
+ }
24
+ // for debug
25
+ if (Util.isDebug() && this.original) {
26
+ range.generatedStart = this.data.generatedStart;
27
+ range.generatedEnd = this.data.generatedEnd;
28
+ }
29
+ return range;
30
+ }
31
+
32
+ generate(locator) {
33
+
34
+ const loc = {
35
+ start: this.start,
36
+ end: this.end
37
+ };
38
+
39
+ Util.updateOffsetToLocation(locator, loc);
40
+
41
+ return loc;
42
+ }
43
+ };
@@ -1,84 +1,84 @@
1
- module.exports = {
2
-
3
- // {string} logging levels: off, error, info, debug
4
- logging: 'info',
5
-
6
- // {string} output dir
7
- outputDir: './coverage-reports',
8
-
9
- // {string|string[]} input raw dir(s)
10
- inputDir: null,
11
-
12
- // {string} v8 or html for istanbul by default
13
- // {array} multiple reports with options
14
- // v8 report or istanbul supported reports
15
- // reports: [
16
- // ['v8'],
17
- // ['html', {
18
- // subdir: 'my-sub-dir'
19
- // }],
20
- // 'lcov'
21
- // ],
22
- reports: '',
23
-
24
- // {string} Report name. Defaults to "Coverage Report".
25
- name: 'Coverage Report',
26
-
27
- // (V8 only) {string} Output [sub dir/]filename. Defaults to "index.html"
28
- outputFile: 'index.html',
29
-
30
- // (V8 only) {boolean} Inline all scripts to the single HTML file. Defaults to false.
31
- inline: false,
32
-
33
- // (V8 only) {string} Assets path if not inline. Defaults to "./assets"
34
- assetsPath: './assets',
35
-
36
- // (V8 only) {function} A filter function to execute for each element in the V8 list.
37
- // entryFilter: (entry) => {
38
- // if (entry.url.indexOf('googleapis.com') !== -1) {
39
- // return false;
40
- // }
41
- // return true;
42
- // },
43
- entryFilter: null,
44
-
45
- // (V8 only) {function} A filter function to execute for each element in the sources which unpacked from the source map.
46
- // sourceFilter: (sourcePath) => sourcePath.search(/src\/.+/) !== -1,
47
- sourceFilter: null,
48
-
49
- // options for adding empty coverage for all files
50
- // all: {
51
- // dir: ['src'],
52
- // filter: (sourcePath) => true
53
- // },
54
- all: null,
55
-
56
- // (V8 only) {boolean} Enable/Disable ignoring uncovered codes with the special comments: v8 ignore next/next N/start/stop
57
- v8Ignore: true,
58
-
59
- // (Istanbul only) defaultSummarizer, sourceFinder
60
-
61
- // {boolean} Generate lcov.info file, same as lcovonly report. Defaults to false.
62
- lcov: false,
63
-
64
- // {function} Source path handler.
65
- // sourcePath: (filePath) => `wwwroot/${filePath}`,
66
- sourcePath: null,
67
-
68
- // {string|function} Specify the report path, especially when there are multiple reports. Defaults to outputDir/index.html.
69
- reportPath: null,
70
-
71
- // {array} watermarks for low/medium/high. Defaults to [50, 80]
72
- // {object} { bytes:[50,80], statements:[50,80], branches:[50,80], functions:[50,80], lines:[50,80] }
73
- watermarks: [50, 80],
74
-
75
- // {boolean} Indicates whether to clean previous files in output dir before generating report. Defaults to true.
76
- clean: true,
77
-
78
- // {boolean} Indicates whether to clean previous cache in output dir before generating report. Defaults to false.
79
- cleanCache: false,
80
-
81
- // {function} onEnd hook
82
- // onEnd: async (reportData) => {}
83
- onEnd: null
84
- };
1
+ module.exports = {
2
+
3
+ // {string} logging levels: off, error, info, debug
4
+ logging: 'info',
5
+
6
+ // {string} output dir
7
+ outputDir: './coverage-reports',
8
+
9
+ // {string|string[]} input raw dir(s)
10
+ inputDir: null,
11
+
12
+ // {string} v8 or html for istanbul by default
13
+ // {array} multiple reports with options
14
+ // v8 report or istanbul supported reports
15
+ // reports: [
16
+ // ['v8'],
17
+ // ['html', {
18
+ // subdir: 'my-sub-dir'
19
+ // }],
20
+ // 'lcov'
21
+ // ],
22
+ reports: '',
23
+
24
+ // {string} Report name. Defaults to "Coverage Report".
25
+ name: 'Coverage Report',
26
+
27
+ // (V8 only) {string} Output [sub dir/]filename. Defaults to "index.html"
28
+ outputFile: 'index.html',
29
+
30
+ // (V8 only) {boolean} Inline all scripts to the single HTML file. Defaults to false.
31
+ inline: false,
32
+
33
+ // (V8 only) {string} Assets path if not inline. Defaults to "./assets"
34
+ assetsPath: './assets',
35
+
36
+ // (V8 only) {function} A filter function to execute for each element in the V8 list.
37
+ // entryFilter: (entry) => {
38
+ // if (entry.url.indexOf('googleapis.com') !== -1) {
39
+ // return false;
40
+ // }
41
+ // return true;
42
+ // },
43
+ entryFilter: null,
44
+
45
+ // (V8 only) {function} A filter function to execute for each element in the sources which unpacked from the source map.
46
+ // sourceFilter: (sourcePath) => sourcePath.search(/src\/.+/) !== -1,
47
+ sourceFilter: null,
48
+
49
+ // options for adding empty coverage for all files
50
+ // all: {
51
+ // dir: ['src'],
52
+ // filter: (sourcePath) => true
53
+ // },
54
+ all: null,
55
+
56
+ // (V8 only) {boolean} Enable/Disable ignoring uncovered codes with the special comments: v8 ignore next/next N/start/stop
57
+ v8Ignore: true,
58
+
59
+ // (Istanbul only) defaultSummarizer, sourceFinder
60
+
61
+ // {boolean} Generate lcov.info file, same as lcovonly report. Defaults to false.
62
+ lcov: false,
63
+
64
+ // {function} Source path handler.
65
+ // sourcePath: (filePath) => `wwwroot/${filePath}`,
66
+ sourcePath: null,
67
+
68
+ // {string|function} Specify the report path, especially when there are multiple reports. Defaults to outputDir/index.html.
69
+ reportPath: null,
70
+
71
+ // {array} watermarks for low/medium/high. Defaults to [50, 80]
72
+ // {object} { bytes:[50,80], statements:[50,80], branches:[50,80], functions:[50,80], lines:[50,80] }
73
+ watermarks: [50, 80],
74
+
75
+ // {boolean} Indicates whether to clean previous files in output dir before generating report. Defaults to true.
76
+ clean: true,
77
+
78
+ // {boolean} Indicates whether to clean previous cache in output dir before generating report. Defaults to false.
79
+ cleanCache: false,
80
+
81
+ // {function} onEnd hook
82
+ // onEnd: async (reportData) => {}
83
+ onEnd: null
84
+ };
@@ -1,47 +1,47 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <link rel="icon" href="data:,">
7
- <title>{title}</title>
8
- <style>
9
- @keyframes fs-loading-animation {
10
- 0% {
11
- transform: rotate(0deg);
12
- }
13
-
14
- 100% {
15
- transform: rotate(360deg);
16
- }
17
- }
18
-
19
- .fs-loading {
20
- position: absolute;
21
- top: 50%;
22
- left: 50%;
23
- z-index: 100;
24
- width: 50px;
25
- height: 50px;
26
- margin-top: -25px;
27
- margin-left: -25px;
28
- animation: 0.382s fs-loading-animation linear infinite;
29
- }
30
-
31
- .fs-loading svg {
32
- display: block;
33
- width: 100%;
34
- height: 100%;
35
- pointer-events: none;
36
- }
37
- </style>
38
- </head>
39
- <body>
40
- <div class="fs-loading">
41
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
42
- <path d="M1,8 A7 7 0 1 1 8 15" stroke="#999" stroke-width="2" stroke-linecap="round" fill="none"/>
43
- </svg>
44
- </div>
45
- {content}
46
- </body>
47
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <link rel="icon" href="data:,">
7
+ <title>{title}</title>
8
+ <style>
9
+ @keyframes fs-loading-animation {
10
+ 0% {
11
+ transform: rotate(0deg);
12
+ }
13
+
14
+ 100% {
15
+ transform: rotate(360deg);
16
+ }
17
+ }
18
+
19
+ .fs-loading {
20
+ position: absolute;
21
+ top: 50%;
22
+ left: 50%;
23
+ z-index: 100;
24
+ width: 50px;
25
+ height: 50px;
26
+ margin-top: -25px;
27
+ margin-left: -25px;
28
+ animation: 0.382s fs-loading-animation linear infinite;
29
+ }
30
+
31
+ .fs-loading svg {
32
+ display: block;
33
+ width: 100%;
34
+ height: 100%;
35
+ pointer-events: none;
36
+ }
37
+ </style>
38
+ </head>
39
+ <body>
40
+ <div class="fs-loading">
41
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
42
+ <path d="M1,8 A7 7 0 1 1 8 15" stroke="#999" stroke-width="2" stroke-linecap="round" fill="none"/>
43
+ </svg>
44
+ </div>
45
+ {content}
46
+ </body>
47
+ </html>