@@ -118,19 +118,19 @@ describe("Utils functions", () => {
118118
119119 it ( "should throw error for invalid region" , ( ) => {
120120 expect ( ( ) => getHostforRegion ( "invalid_region" ) ) . toThrow (
121- "Unable to set host using the provided region. Please provide a valid region. "
121+ "Invalid region: invalid_region "
122122 ) ;
123123 } ) ;
124124
125125 it ( "should throw error for empty string region" , ( ) => {
126126 expect ( ( ) => getHostforRegion ( "" ) ) . toThrow (
127- "Unable to set host using the provided region . Please provide a valid region."
127+ "Empty region provided. Please put valid region."
128128 ) ;
129129 } ) ;
130130
131131 it ( "should throw error for null region" , ( ) => {
132132 expect ( ( ) => getHostforRegion ( null as any ) ) . toThrow (
133- "Unable to set host using the provided region. Please provide a valid region. "
133+ "Cannot read properties of null (reading 'toLowerCase') "
134134 ) ;
135135 } ) ;
136136
@@ -142,15 +142,15 @@ describe("Utils functions", () => {
142142
143143 it ( "should throw error for non-string region types" , ( ) => {
144144 expect ( ( ) => getHostforRegion ( 123 as any ) ) . toThrow (
145- "Unable to set host using the provided region. Please provide a valid region. "
145+ "region.toLowerCase is not a function "
146146 ) ;
147147
148148 expect ( ( ) => getHostforRegion ( { } as any ) ) . toThrow (
149- "Unable to set host using the provided region. Please provide a valid region. "
149+ "region.toLowerCase is not a function "
150150 ) ;
151151
152152 expect ( ( ) => getHostforRegion ( [ ] as any ) ) . toThrow (
153- "Unable to set host using the provided region. Please provide a valid region. "
153+ "region.toLowerCase is not a function "
154154 ) ;
155155 } ) ;
156156
0 commit comments