Skip to content

Commit 4d52bb7

Browse files
authored
Update Structure Generator Tests (#165)
1 parent 6ec886c commit 4d52bb7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ public void testErrorStructureCodegen(String file, String expectedType) {
6666
assertThat(contents, containsString("as __SmithyException"));
6767
assertThat(contents, containsString(expectedType));
6868
assertThat(contents, containsString("namespace Err {\n"
69-
+ " export function isa(o: any): o is Err {\n"
70-
+ " return __isa(o, \"Err\");\n"
71-
+ " }\n"
69+
+ " export const isa = (o: any): o is Err => "
70+
+ "__isa(o, \"Err\");\n"
7271
+ "}"));
7372
}
7473

@@ -89,9 +88,7 @@ public void generatesNonErrorStructures() {
8988
assertThat(output, containsString("foo?: string;"));
9089
assertThat(output, containsString("export namespace Bar {"));
9190
assertThat(output, containsString(
92-
"export function isa(o: any): o is Bar {\n"
93-
+ " return __isa(o, \"Bar\");\n"
94-
+ " }"));
91+
"export const isa = (o: any): o is Bar => __isa(o, \"Bar\");"));
9592
}
9693

9794
private StructureShape createNonErrorStructure() {

0 commit comments

Comments
 (0)