From 39dbd2d472fb83ed1e4a6363a774a184f9452578 Mon Sep 17 00:00:00 2001 From: Boshen Date: Fri, 24 Jan 2025 11:58:02 +0800 Subject: [PATCH] test(codegen): fix snapshot file (#8685) --- crates/oxc_codegen/tests/integration/jsdoc.rs | 6 ++++++ .../tests/integration/snapshots/jsodc.snap | 12 ++++++++++++ .../tests/fixtures/signatures.ts | 10 ---------- .../tests/snapshots/signatures.snap | 9 --------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/crates/oxc_codegen/tests/integration/jsdoc.rs b/crates/oxc_codegen/tests/integration/jsdoc.rs index 7710a1436..5822c1718 100644 --- a/crates/oxc_codegen/tests/integration/jsdoc.rs +++ b/crates/oxc_codegen/tests/integration/jsdoc.rs @@ -106,6 +106,12 @@ export enum DefinitionKind { */ TS = 'TS', } +export type TSTypeLiteral = { + /** + * Comment + */ + foo: string +} ", ]; diff --git a/crates/oxc_codegen/tests/integration/snapshots/jsodc.snap b/crates/oxc_codegen/tests/integration/snapshots/jsodc.snap index 9924920cd..7ee657e11 100644 --- a/crates/oxc_codegen/tests/integration/snapshots/jsodc.snap +++ b/crates/oxc_codegen/tests/integration/snapshots/jsodc.snap @@ -105,6 +105,12 @@ export enum DefinitionKind { */ TS = 'TS', } +export type TSTypeLiteral = { + /** + * Comment + */ + foo: string +} ---------- /** @@ -186,3 +192,9 @@ export enum DefinitionKind { */ TS = 'TS', } +export type TSTypeLiteral = { + /** + * Comment + */ + foo: string +}; diff --git a/crates/oxc_isolated_declarations/tests/fixtures/signatures.ts b/crates/oxc_isolated_declarations/tests/fixtures/signatures.ts index 8949d53eb..cbb85d1d9 100644 --- a/crates/oxc_isolated_declarations/tests/fixtures/signatures.ts +++ b/crates/oxc_isolated_declarations/tests/fixtures/signatures.ts @@ -1,18 +1,9 @@ export interface X { - /** - * Comment - */ set value(_: string); } export type A = { - /** - * Comment - */ set value({ a, b, c }: { a: string; b: string; c: string }); - /** - * Comment - */ get value(); }; @@ -21,7 +12,6 @@ export interface I { get value(): string; } - // Do nothing export interface Ref { get value(): T diff --git a/crates/oxc_isolated_declarations/tests/snapshots/signatures.snap b/crates/oxc_isolated_declarations/tests/snapshots/signatures.snap index 2f1cd6f88..2bed4c93b 100644 --- a/crates/oxc_isolated_declarations/tests/snapshots/signatures.snap +++ b/crates/oxc_isolated_declarations/tests/snapshots/signatures.snap @@ -6,23 +6,14 @@ input_file: crates/oxc_isolated_declarations/tests/fixtures/signatures.ts ==================== .D.TS ==================== export interface X { - /** - * Comment - */ set value(_: string); } export type A = { - /** - * Comment - */ set value({ a, b, c }: { a: string b: string c: string }) - /** - * Comment - */ get value(): { a: string b: string