@@ -7,21 +7,24 @@ import { struct } from "./schemas/StructureSchema";
77import { TypeRegistry } from "./TypeRegistry" ;
88
99describe ( TypeRegistry . name , ( ) => {
10- const [ List , Map , Struct ] = [ list ( "ack" , "List" , { sparse : 1 } , 0 ) , map ( "ack" , "Map" , 0 , 0 , 1 ) , ( ) => schema ] ;
11- const schema = struct ( "ack" , "Structure" , { } , [ "list" , "map" , "struct" ] , [ List , Map , Struct ] ) ;
12-
13- const tr = TypeRegistry . for ( "ack" ) ;
10+ const [ List , Map , Struct ] = [
11+ list ( "NAMESPACE" , "List" , { sparse : 1 } , 0 ) ,
12+ map ( "NAMESPACE" , "Map" , 0 , 0 , 1 ) ,
13+ ( ) => schema ,
14+ ] ;
15+ const schema = struct ( "NAMESPACE" , "Structure" , { } , [ "list" , "map" , "struct" ] , [ List , Map , Struct ] ) ;
1416
1517 it ( "stores and retrieves schema objects" , ( ) => {
18+ const tr = TypeRegistry . for ( "NAMESPACE" ) ;
1619 expect ( tr . getSchema ( "List" ) ) . toBe ( List ) ;
1720 expect ( tr . getSchema ( "Map" ) ) . toBe ( Map ) ;
1821 expect ( tr . getSchema ( "Structure" ) ) . toBe ( schema ) ;
1922 } ) ;
2023
2124 it ( "has a helper method to retrieve a synthetic base exception" , ( ) => {
2225 // the service namespace is appended to the synthetic prefix.
23- const err = error ( "smithyts.client. synthetic.ack " , "UhOhServiceException" , 0 , [ ] , [ ] , Error ) ;
24- const tr = TypeRegistry . for ( "smithyts.client. synthetic.ack " ) ;
25- expect ( tr . getBaseException ( ) ) . toEqual ( err ) ;
26+ const err = error ( "smithy.ts.sdk. synthetic.NAMESPACE " , "UhOhServiceException" , 0 , [ ] , [ ] , Error ) ;
27+ const tr = TypeRegistry . for ( "smithy.ts.sdk. synthetic.NAMESPACE " ) ;
28+ expect ( tr . getBaseException ( ) ) . toBe ( err ) ;
2629 } ) ;
2730} ) ;
0 commit comments