MCPcopy Create free account
hub / github.com/babel/babel / output

Method output

scripts/parser-tests/utils/parser-test-runner.js:255–335  ·  view source on GitHub ↗
(summary)

Source from the content-addressed store, hash-verified

253 }
254
255 async output(summary) {
256 const goodnews = [
257 summary.allowed.success.length + " valid programs parsed without error",
258 summary.allowed.failure.length +
259 " invalid programs produced a parsing error",
260 summary.allowed.falsePositive.length +
261 " invalid programs did not produce a parsing error" +
262 " (and allowed by the allowlist file)",
263 summary.allowed.falseNegative.length +
264 " valid programs produced a parsing error" +
265 " (and allowed by the allowlist file)",
266 ];
267 const badnews = [];
268 const badnewsDetails = [];
269
270 void [
271 {
272 tests: summary.disallowed.success,
273 label:
274 "valid programs parsed without error" +
275 " (in violation of the allowlist file)",
276 },
277 {
278 tests: summary.disallowed.failure,
279 label:
280 "invalid programs produced a parsing error" +
281 " (in violation of the allowlist file)",
282 },
283 {
284 tests: summary.disallowed.falsePositive,
285 label:
286 "invalid programs did not produce a parsing error" +
287 " (without a corresponding entry in the allowlist file)",
288 },
289 {
290 tests: summary.disallowed.falseNegative,
291 label:
292 "valid programs produced a parsing error" +
293 " (without a corresponding entry in the allowlist file)",
294 },
295 {
296 tests: summary.unrecognized,
297 label: "non-existent programs specified in the allowlist file",
298 },
299 ].forEach(function ({ tests, label }) {
300 if (!tests.length) {
301 return;
302 }
303
304 const desc = tests.length + " " + label;
305
306 badnews.push(desc);
307 badnewsDetails.push(desc + ":");
308 badnewsDetails.push(
309 ...tests.map(
310 test =>
311 ` ${test.id || test} ${test.expectedError} ${test.actualError}`
312 )

Callers 1

runMethod · 0.95

Calls 4

updateAllowlistMethod · 0.95
mapMethod · 0.80
replaceMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected