|
54 | 54 | "description": "Enables debugging mode for tests, allowing the use of the Node Inspector.", |
55 | 55 | "default": false |
56 | 56 | }, |
57 | | - "codeCoverage": { |
| 57 | + "coverage": { |
58 | 58 | "type": "boolean", |
59 | | - "description": "Enables code coverage reporting for tests.", |
| 59 | + "description": "Enables coverage reporting for tests.", |
60 | 60 | "default": false |
61 | 61 | }, |
62 | | - "codeCoverageExclude": { |
| 62 | + "coverageAll": { |
| 63 | + "type": "boolean", |
| 64 | + "description": "Includes all files that match the `coverageInclude` pattern in the coverage report, not just those touched by tests.", |
| 65 | + "default": true |
| 66 | + }, |
| 67 | + "coverageInclude": { |
63 | 68 | "type": "array", |
64 | | - "description": "Specifies glob patterns of files to exclude from the code coverage report.", |
| 69 | + "description": "Specifies glob patterns of files to include in the coverage report.", |
65 | 70 | "items": { |
66 | 71 | "type": "string" |
67 | 72 | } |
68 | 73 | }, |
69 | | - "codeCoverageReporters": { |
| 74 | + "coverageExclude": { |
70 | 75 | "type": "array", |
71 | | - "description": "Specifies the reporters to use for code coverage results. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'html', 'lcov', 'lcovonly', 'text', 'text-summary', 'cobertura', 'json', and 'json-summary'.", |
| 76 | + "description": "Specifies glob patterns of files to exclude from the coverage report.", |
| 77 | + "items": { |
| 78 | + "type": "string" |
| 79 | + } |
| 80 | + }, |
| 81 | + "coverageReporters": { |
| 82 | + "type": "array", |
| 83 | + "description": "Specifies the reporters to use for coverage results. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'html', 'lcov', 'lcovonly', 'text', 'text-summary', 'cobertura', 'json', and 'json-summary'.", |
72 | 84 | "items": { |
73 | 85 | "oneOf": [ |
74 | 86 | { |
|
108 | 120 | ] |
109 | 121 | } |
110 | 122 | }, |
| 123 | + "coverageThresholds": { |
| 124 | + "type": "object", |
| 125 | + "description": "Specifies minimum coverage thresholds that must be met. If thresholds are not met, the builder will exit with an error.", |
| 126 | + "properties": { |
| 127 | + "perFile": { |
| 128 | + "type": "boolean", |
| 129 | + "description": "When true, thresholds are enforced for each file individually." |
| 130 | + }, |
| 131 | + "statements": { |
| 132 | + "type": "number", |
| 133 | + "description": "Minimum percentage of statements covered." |
| 134 | + }, |
| 135 | + "branches": { |
| 136 | + "type": "number", |
| 137 | + "description": "Minimum percentage of branches covered." |
| 138 | + }, |
| 139 | + "functions": { |
| 140 | + "type": "number", |
| 141 | + "description": "Minimum percentage of functions covered." |
| 142 | + }, |
| 143 | + "lines": { |
| 144 | + "type": "number", |
| 145 | + "description": "Minimum percentage of lines covered." |
| 146 | + } |
| 147 | + }, |
| 148 | + "additionalProperties": false |
| 149 | + }, |
| 150 | + "coverageWatermarks": { |
| 151 | + "type": "object", |
| 152 | + "description": "Specifies coverage watermarks for the HTML reporter. These determine the color coding for high, medium, and low coverage.", |
| 153 | + "properties": { |
| 154 | + "statements": { |
| 155 | + "type": "array", |
| 156 | + "description": "The high and low watermarks for statements coverage. `[low, high]`", |
| 157 | + "items": { "type": "number" }, |
| 158 | + "minItems": 2, |
| 159 | + "maxItems": 2 |
| 160 | + }, |
| 161 | + "branches": { |
| 162 | + "type": "array", |
| 163 | + "description": "The high and low watermarks for branches coverage. `[low, high]`", |
| 164 | + "items": { "type": "number" }, |
| 165 | + "minItems": 2, |
| 166 | + "maxItems": 2 |
| 167 | + }, |
| 168 | + "functions": { |
| 169 | + "type": "array", |
| 170 | + "description": "The high and low watermarks for functions coverage. `[low, high]`", |
| 171 | + "items": { "type": "number" }, |
| 172 | + "minItems": 2, |
| 173 | + "maxItems": 2 |
| 174 | + }, |
| 175 | + "lines": { |
| 176 | + "type": "array", |
| 177 | + "description": "The high and low watermarks for lines coverage. `[low, high]`", |
| 178 | + "items": { "type": "number" }, |
| 179 | + "minItems": 2, |
| 180 | + "maxItems": 2 |
| 181 | + } |
| 182 | + }, |
| 183 | + "additionalProperties": false |
| 184 | + }, |
111 | 185 | "reporters": { |
112 | 186 | "type": "array", |
113 | 187 | "description": "Specifies the reporters to use during test execution. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'default', 'verbose', 'dots', 'json', 'junit', 'tap', 'tap-flat', and 'html'. You can also provide a path to a custom reporter.", |
|
0 commit comments