@@ -126,19 +126,19 @@ describe('DrsClient', () => {
126126
127127 describe ( 'constructor' , ( ) => {
128128 it ( 'throws error when API base URL is missing' , ( ) => {
129- expect ( ( ) => new DrsClient ( { apiKey : API_KEY } ) ) . to . throw ( 'Invalid DRS API Base URL: undefined ' ) ;
129+ expect ( ( ) => new DrsClient ( { apiKey : API_KEY } ) ) . to . throw ( 'Invalid or missing DRS API Base URL' ) ;
130130 } ) ;
131131
132132 it ( 'throws error when API base URL is invalid' , ( ) => {
133- expect ( ( ) => new DrsClient ( { apiBaseUrl : 'not-a-url' , apiKey : API_KEY } ) ) . to . throw ( 'Invalid DRS API Base URL: not-a-url ' ) ;
133+ expect ( ( ) => new DrsClient ( { apiBaseUrl : 'not-a-url' , apiKey : API_KEY } ) ) . to . throw ( 'Invalid or missing DRS API Base URL' ) ;
134134 } ) ;
135135
136136 it ( 'throws error when API key is missing' , ( ) => {
137- expect ( ( ) => new DrsClient ( { apiBaseUrl : API_BASE_URL } ) ) . to . throw ( 'Invalid DRS API Key: undefined ' ) ;
137+ expect ( ( ) => new DrsClient ( { apiBaseUrl : API_BASE_URL } ) ) . to . throw ( 'Invalid or missing DRS API Key' ) ;
138138 } ) ;
139139
140140 it ( 'throws error when API key is empty' , ( ) => {
141- expect ( ( ) => new DrsClient ( { apiBaseUrl : API_BASE_URL , apiKey : '' } ) ) . to . throw ( 'Invalid DRS API Key: ' ) ;
141+ expect ( ( ) => new DrsClient ( { apiBaseUrl : API_BASE_URL , apiKey : '' } ) ) . to . throw ( 'Invalid or missing DRS API Key' ) ;
142142 } ) ;
143143
144144 it ( 'creates client with valid config' , ( ) => {
@@ -193,7 +193,7 @@ describe('DrsClient', () => {
193193 log,
194194 } ;
195195
196- expect ( ( ) => DrsClient . createFrom ( context ) ) . to . throw ( 'Invalid DRS API Base URL: undefined ' ) ;
196+ expect ( ( ) => DrsClient . createFrom ( context ) ) . to . throw ( 'Invalid or missing DRS API Base URL' ) ;
197197 } ) ;
198198
199199 it ( 'throws when DRS_API_KEY is missing from env' , ( ) => {
@@ -202,7 +202,7 @@ describe('DrsClient', () => {
202202 log,
203203 } ;
204204
205- expect ( ( ) => DrsClient . createFrom ( context ) ) . to . throw ( 'Invalid DRS API Key: undefined ' ) ;
205+ expect ( ( ) => DrsClient . createFrom ( context ) ) . to . throw ( 'Invalid or missing DRS API Key' ) ;
206206 } ) ;
207207 } ) ;
208208
0 commit comments