@@ -74,7 +74,7 @@ describe('DataConnectApiClient', () => {
7474 const connectorConfig_with_connector : ConnectorConfig = {
7575 location : 'us-west2' ,
7676 serviceId : 'my-service' ,
77- connector : 'mock-connector' //this is fake, I need to verify where to put it officially within mock.ts perhaps- still unsure
77+ connector : 'mock-connector'
7878 } ;
7979
8080 const clientWithoutProjectId = new DataConnectApiClient (
@@ -274,7 +274,7 @@ describe('DataConnectApiClient', () => {
274274 expect ( resp . data . users ) . to . deep . equal ( TEST_RESPONSE . data . users ) ;
275275 expect ( stub ) . to . have . been . calledOnce . and . calledWith ( {
276276 method : 'POST' ,
277- url : `https://firebasedataconnect.googleapis.com/v1alpha/projects/test-project/locations/${ connectorConfig . location } /services/${ connectorConfig . serviceId } :executeGraphql` ,
277+ url : `https://firebasedataconnect.googleapis.com/v1alpha/projects/test-project/locations/${ connectorConfig_with_connector . location } /services/${ connectorConfig_with_connector . serviceId } :executeGraphql` ,
278278 headers : EXPECTED_HEADERS ,
279279 data : { query : 'query' }
280280 } ) ;
@@ -290,7 +290,7 @@ describe('DataConnectApiClient', () => {
290290 . then ( ( ) => {
291291 expect ( stub ) . to . have . been . calledOnce . and . calledWith ( {
292292 method : 'POST' ,
293- url : `http://localhost:9399/v1alpha/projects/test-project/locations/${ connectorConfig . location } /services/${ connectorConfig . serviceId } :executeGraphql` ,
293+ url : `http://localhost:9399/v1alpha/projects/test-project/locations/${ connectorConfig_with_connector . location } /services/${ connectorConfig_with_connector . serviceId } :executeGraphql` ,
294294 headers : EMULATOR_EXPECTED_HEADERS ,
295295 data : { query : 'query' }
296296 } ) ;
@@ -300,7 +300,6 @@ describe('DataConnectApiClient', () => {
300300 } ) ;
301301
302302 describe ( 'executeMutation' , ( ) => {
303- //what if there's no project id and also there's no connector, what error would that be? -> should error the connector first because you won't even reach the endpoint to find out if there's a project id or not
304303 it ( 'should reject when project id is not available' , ( ) => {
305304 return clientWithoutProjectId_with_connector . executeMutation ( { operationName : 'getById' } )
306305 . should . eventually . be . rejectedWith ( noProjectId ) ;
@@ -322,7 +321,7 @@ describe('DataConnectApiClient', () => {
322321 ) ;
323322 } ) ;
324323 } ) ;
325- //could this pass as a null object, also what if the wrong operaton was passed in, would it be handled in another test- say integration?
324+
326325 it ( 'should throw an error if there is no operationName' , async ( ) => {
327326 await expect ( apiClient_with_connector . executeMutation ( { } ) ) . to . be . rejectedWith (
328327 FirebaseDataConnectError ,
0 commit comments