diff --git a/packages/codegen/test/print.test.ts b/packages/codegen/test/print.test.ts index 5a271f3268..3de75ddab7 100644 --- a/packages/codegen/test/print.test.ts +++ b/packages/codegen/test/print.test.ts @@ -19,9 +19,11 @@ import type * as ESTree from "../../../npm/oxc-types/types.d.ts"; // Parse options for the cases which give source rather than an AST. // -// `preserveParens: false` because this printer deliberately does not support the redundant -// `ParenthesizedExpression` node. `experimentalRawTransfer` is how the printer is meant to be used, -// so the ASTs are the shape it really sees. +// `preserveParens: false`, so every paren in the output is one the printer decided on itself. +// The printer does support `ParenthesizedExpression` nodes - hand-built ASTs below test them, +// and the fixture and conformance suites check both `preserveParens` modes against Rust. +// +// `experimentalRawTransfer` is how the printer is meant to be used, so the ASTs are the shape it really sees. // // `experimentalRawTransfer` is not in the published `ParserOptions` type - it is experimental and // untyped. Declaring the object here rather than inline at the call site keeps TypeScript's excess diff --git a/packages/codegen/test/source-maps.test.ts b/packages/codegen/test/source-maps.test.ts index bacde1b84e..3b97beac95 100644 --- a/packages/codegen/test/source-maps.test.ts +++ b/packages/codegen/test/source-maps.test.ts @@ -23,9 +23,11 @@ import type * as ESTree from "../../../npm/oxc-types/types.d.ts"; // The inline fixtures below always run. const CACHE_DIR_PATH = pathJoin(import.meta.dirname, "../../../target"); -// `preserveParens: false` because this printer deliberately does not support the redundant -// `ParenthesizedExpression` / `TSParenthesizedType` nodes. `experimentalRawTransfer` is how the -// printer is meant to be used, so the ASTs here are the shape it really sees. +// One `preserveParens` mode is enough for these checks, so `false`. The printer supports +// `ParenthesizedExpression` / `TSParenthesizedType` nodes, and the fixture and conformance suites +// check both modes against Rust. +// +// `experimentalRawTransfer` is how the printer is meant to be used, so the ASTs here are the shape it really sees. const PARSE_OPTIONS = { preserveParens: false, experimentalRawTransfer: true,