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,615 / 91,615100.00%8,656 / 8,656100.00%0
TypeScript13,601 / 13,72899.07%1,716 / 3,20753.51%1,618
Babel2,275 / 2,27899.87%1,703 / 1,80294.51%102

Code generation

  • Positive passed: printing and reparsing preserve the AST, and printing again produces identical code.
SuitePositive passedFailed
Test26291,615 / 91,615100.00%0
TypeScript13,710 / 13,72899.87%18
Babel2,278 / 2,278100.00%0

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,552 / 15,61386.80%162,045
Babel525 / 4,08212.86%1123,445
SWC8 / 1361.54%05

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,453 / 47,453100.00%47,443 / 47,45399.98%10
TypeScript11,748 / 11,748100.00%11,631 / 11,74899.00%117

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,378 / 47,45399.84%75
TypeScript14,911 / 14,91999.95%8