From dee2be5d20d997973a88bd9712b2ed4ee7a55ed8 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 27 Apr 2020 21:52:35 +0000 Subject: [PATCH] Fix Structure Generator Test --- .../typescript/codegen/StructureGeneratorTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java index 89c71f0bde4..36b7d845b75 100644 --- a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java +++ b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java @@ -66,9 +66,8 @@ public void testErrorStructureCodegen(String file, String expectedType) { assertThat(contents, containsString("as __SmithyException")); assertThat(contents, containsString(expectedType)); assertThat(contents, containsString("namespace Err {\n" - + " export function isa(o: any): o is Err {\n" - + " return __isa(o, \"Err\");\n" - + " }\n" + + " export const isa = (o: any): o is Err => " + + "__isa(o, \"Err\");\n" + "}")); } @@ -89,9 +88,7 @@ public void generatesNonErrorStructures() { assertThat(output, containsString("foo?: string;")); assertThat(output, containsString("export namespace Bar {")); assertThat(output, containsString( - "export function isa(o: any): o is Bar {\n" - + " return __isa(o, \"Bar\");\n" - + " }")); + "export const isa = (o: any): o is Bar => __isa(o, \"Bar\");")); } private StructureShape createNonErrorStructure() {