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,755 / 3,26853.70%1,627
Babel2,361 / 2,36799.75%1,859 / 1,95095.33%97

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,365 / 2,36799.92%2

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,097 / 1,15794.81%60
Prettier TypeScript / TSX766 / 78897.21%22
Prettier Markdown1,474 / 1,48998.99%15

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,070 / 15,95181.94%8622,019
SWC467 / 2,11022.13%191,624

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,055 / 12,15699.17%101

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,568 / 15,568100.00%0