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

Method output

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

Source from the content-addressed store, hash-verified

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

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