@@ -74,7 +74,7 @@ describe('DataConnectApiClient', () => {
74
74
const connectorConfig_with_connector : ConnectorConfig = {
75
75
location : 'us-west2' ,
76
76
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'
78
78
} ;
79
79
80
80
const clientWithoutProjectId = new DataConnectApiClient (
@@ -274,7 +274,7 @@ describe('DataConnectApiClient', () => {
274
274
expect ( resp . data . users ) . to . deep . equal ( TEST_RESPONSE . data . users ) ;
275
275
expect ( stub ) . to . have . been . calledOnce . and . calledWith ( {
276
276
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` ,
278
278
headers : EXPECTED_HEADERS ,
279
279
data : { query : 'query' }
280
280
} ) ;
@@ -290,7 +290,7 @@ describe('DataConnectApiClient', () => {
290
290
. then ( ( ) => {
291
291
expect ( stub ) . to . have . been . calledOnce . and . calledWith ( {
292
292
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` ,
294
294
headers : EMULATOR_EXPECTED_HEADERS ,
295
295
data : { query : 'query' }
296
296
} ) ;
@@ -300,7 +300,6 @@ describe('DataConnectApiClient', () => {
300
300
} ) ;
301
301
302
302
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
304
303
it ( 'should reject when project id is not available' , ( ) => {
305
304
return clientWithoutProjectId_with_connector . executeMutation ( { operationName : 'getById' } )
306
305
. should . eventually . be . rejectedWith ( noProjectId ) ;
@@ -322,7 +321,7 @@ describe('DataConnectApiClient', () => {
322
321
) ;
323
322
} ) ;
324
323
} ) ;
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
+
326
325
it ( 'should throw an error if there is no operationName' , async ( ) => {
327
326
await expect ( apiClient_with_connector . executeMutation ( { } ) ) . to . be . rejectedWith (
328
327
FirebaseDataConnectError ,
0 commit comments