@@ -98,7 +98,7 @@ describe('ClientStore', () => {
9898 ClientErrorMessage . DUBPLICATE_CLIENT_NAME . replace ( '{{clientName}}' , mocks . clientName ) ,
9999 ) ;
100100
101- expect ( initializeClientCall ) . toThrowError ( invalidClientNameError ) ;
101+ expect ( initializeClientCall ) . toThrow ( invalidClientNameError ) ;
102102 } ) ;
103103
104104 it ( `should throw when neither 'option.apiKey' & ${ GELATO_API_KEY_VAR } is available` , ( ) => {
@@ -108,7 +108,7 @@ describe('ClientStore', () => {
108108 'mock-client-no-api-key-provided' ,
109109 ) ;
110110
111- expect ( initializeClientCall ) . toThrowError ( GelatoClientError ) ;
111+ expect ( initializeClientCall ) . toThrow ( GelatoClientError ) ;
112112 } ) ;
113113
114114 it ( 'should throw when an empty apiKey is provided' , ( ) => {
@@ -132,21 +132,21 @@ describe('ClientStore', () => {
132132 describe ( '#getClient()' , ( ) => {
133133 it ( 'should throw when provided clientName is not a non-empty string' , ( ) => {
134134 const expectedError = makeInvalidClientError ( emptyClientName ) ;
135- expect ( ( ) => mockClientStore . getClient ( emptyClientName ) ) . toThrowError ( expectedError ) ;
135+ expect ( ( ) => mockClientStore . getClient ( emptyClientName ) ) . toThrow ( expectedError ) ;
136136 } ) ;
137137
138138 it ( 'should throw when a client by clientName does not exist' , ( ) => {
139139 const nonExistingClientName = 'non-existing-client-name' ;
140140 const expectedErrorMessage = `Gelato client named "${ nonExistingClientName } " does not exist. Make sure you call initializeClient() before using any of the Gelato API services.` ;
141141 const expectedError = makeNoClientError ( expectedErrorMessage ) ;
142- expect ( ( ) => mockClientStore . getClient ( nonExistingClientName ) ) . toThrowError ( expectedError ) ;
142+ expect ( ( ) => mockClientStore . getClient ( nonExistingClientName ) ) . toThrow ( expectedError ) ;
143143 } ) ;
144144
145145 it ( 'should throw when the default clientName does not exist' , ( ) => {
146146 const expectedErrorMessage =
147147 'The default Gelato client does not exist. Make sure you call initializeClient() before using any of the Gelato API services.' ;
148148 const expectedError = makeNoClientError ( expectedErrorMessage ) ;
149- expect ( ( ) => new ClientStore ( ) . getClient ( DEFAULT_CLIENT_NAME ) ) . toThrowError ( expectedError ) ;
149+ expect ( ( ) => new ClientStore ( ) . getClient ( DEFAULT_CLIENT_NAME ) ) . toThrow ( expectedError ) ;
150150 } ) ;
151151
152152 it ( 'should return a client instance by given clientName' , ( ) => {
0 commit comments