From 1a35ebe681a3a01f16f6a9584faa9ed2487e6369 Mon Sep 17 00:00:00 2001 From: Oleh Dokuka Date: Fri, 22 Nov 2024 21:56:52 +0200 Subject: [PATCH] add fixes --- openrewrite/src/javascript/parser.ts | 6 +----- .../javascript/e2e/google-maps-services-js_files.test.ts | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/openrewrite/src/javascript/parser.ts b/openrewrite/src/javascript/parser.ts index dc7c56af..1aeb2899 100644 --- a/openrewrite/src/javascript/parser.ts +++ b/openrewrite/src/javascript/parser.ts @@ -1998,11 +1998,7 @@ export class JavaScriptParserVisitor { } visitOmittedExpression(node: ts.OmittedExpression) { - return new J.Empty( - randomId(), - this.prefix(node), - Markers.EMPTY, - ); + return this.newJEmpty(this.prefix(node)); } visitExpressionWithTypeArguments(node: ts.ExpressionWithTypeArguments) { diff --git a/openrewrite/test/javascript/e2e/google-maps-services-js_files.test.ts b/openrewrite/test/javascript/e2e/google-maps-services-js_files.test.ts index 8208514d..40b8dd67 100644 --- a/openrewrite/test/javascript/e2e/google-maps-services-js_files.test.ts +++ b/openrewrite/test/javascript/e2e/google-maps-services-js_files.test.ts @@ -119,8 +119,7 @@ describe('google-maps-services-js files tests', () => { }); test('reversegeocode.ts', () => { - rewriteRunWithOptions( - {expectUnknowns : false}, + rewriteRun( //language=typescript typeScript(` /**