Guide/Testing

Testing

Conformance

Parser

  • Positive passed: valid fixtures that parse and meet their early-error expectations, divided by all positive fixtures.
  • Negative passed: invalid fixtures that produce a parse or semantic early error, divided by all negative fixtures.
SuitePositive passedNegative passedFailed
Test26291,985 / 91,985100.00%8,688 / 8,688100.00%0
TypeScript13,948 / 14,06299.19%1,742 / 3,26853.30%1,640
Babel2,362 / 2,36799.79%1,854 / 1,95095.08%101

Code generation

  • Positive passed: printing and reparsing preserve the AST, and printing again produces identical code.
SuitePositive passedFailed
Test26291,985 / 91,985100.00%0
TypeScript14,056 / 14,06299.96%6
Babel2,366 / 2,36799.96%1

Formatting

  • Passed means the output matches the pinned Prettier snapshot, the source and AST entry points agree, and formatting is idempotent.
  • JavaScript/JSX and TypeScript/TSX counts cover physical fixtures. Markdown counts also include inline examples. Each report lists the cases its formatter supports.
SuitePassedNot passed
Prettier JavaScript / JSX1,023 / 1,09493.51%71
Prettier TypeScript / TSX752 / 78296.16%30
Prettier Markdown1,478 / 1,48999.26%11

Transformations

  • Positive passed: normalized output matches the expected output. Without an output baseline, repeated transformation must produce identical code; declaration inputs must emit no JavaScript.
  • Skipped: unsupported options, or inputs/outputs that cannot be parsed, checked, or normalized. Included in the positive total, but not passes.
SuitePositive passedFailedSkipped
TypeScript13,083 / 15,95182.02%8622,006
Babel606 / 4,39213.80%1223,664
SWC462 / 2,11021.90%401,608

Minification

  • Positive passed: normalized output matches the reference output of the target minifier, reparses, and minifies a second time to identical code.
  • Negative passed: the reference output equals the input, and the minifier keeps the code unchanged.
  • Skipped: fixtures without a reference output, fixtures with mangle.json, or inputs and reference outputs that cannot be parsed. Included in the positive total, but not passes.
SuitePositive passedNegative passedFailedSkipped
Terser130 / 1,5778.24%602 / 61098.69%1,102353
SWC84 / 8639.73%103 / 10499.04%72357

ESTree

  • AST parsed: AST generation and serialization complete for every source unit in a fixture.
  • AST matched: every unit's AST matches its reference. Rates count fixtures.
SuiteAST parsedAST matchedNot passed
Test26247,637 / 47,637100.00%47,626 / 47,63799.98%11
TypeScript12,156 / 12,156100.00%12,041 / 12,15699.05%115

Codec

  • Codec passed: a source unit's JavaScript decode/encode path prints exactly the same code as the native path. Each source unit counts separately.
  • Excluded: units rejected with parser error diagnostics. Exceptions and output mismatches count as not passed.
SuiteCodec passedNot passed
Test26247,637 / 47,637100.00%0
TypeScript15,581 / 15,581100.00%0