Yuku
Testing
Yuku is tested for spec conformance, exact AST shapes, codegen soundness, name resolution, and behavior under memory pressure.
The parser test suite
The parser runs against parser-test-suite, over 55,000 tests from Test262, the TypeScript compiler, and Babel, synced with upstream daily.
| Category | Expectation |
|---|---|
pass | Parses with no diagnostics, and the AST matches a snapshot exactly |
fail | Produces a syntax error |
semantic | Parses, then fails semantic analysis with an early error |
The snapshots come from an independent parser, Oxc, so a match means Yuku produces the tree the ESTree ecosystem agrees on, down to every field, position, and comment. Passing files must also walk in source order and pass semantic analysis without a false positive. Yuku passes every test, with zero failures and zero AST mismatches.
The suite runs through the npm packages built from local source, so every run checks the whole chain from the Zig parser to the JavaScript AST, and the WebAssembly core must match the native core byte for byte.
Codegen
Every parseable file in the suite is printed under several option sets. Each output must parse again, plain output must reparse to the same AST, and printing must be a fixed point with no comment lost or duplicated. The Zig and JavaScript printers must agree byte for byte, and every identifier in a source map must trace back to its original name and position.
Semantic analysis
Every file in the suite is analyzed, along with eight real codebases pinned to a commit: the TypeScript compiler, Vue, Svelte, Preact, three.js, Zod, date-fns, and Excalidraw. The TypeScript checker must resolve every reference, values and types alike, to the same declaration Yuku does, and @typescript-eslint/scope-manager must agree on every runtime reference and write, and on every declaration and its scope, over a million comparisons each.
Each codebase is also linked as one project, and every import, re-export, exported name, and relative path must resolve as in a TypeScript program.
Fuzzing
A fuzzer throws millions of adversarial inputs at the parser in every language mode, with out-of-memory failures injected along the way. The parser must never crash, any failure dumps a self-contained reproducer, and with everything in one arena, a parse has nothing to leak even when memory runs out.