@@ -14,7 +14,7 @@ describe('providers/firestore', () => {
1414 test = fft ( ) ;
1515 fakeHttpResponse = {
1616 statusCode : 200 ,
17- on : ( ( event , cb ) => cb ( ) )
17+ on : ( event , cb ) => cb ( ) ,
1818 } ;
1919 fakeHttpRequestMethod = sinon . fake ( ( config , cb ) => {
2020 cb ( fakeHttpResponse ) ;
@@ -91,26 +91,32 @@ describe('providers/firestore', () => {
9191 it ( 'should use host name from FIRESTORE_EMULATOR_HOST env in clearFirestoreData' , async ( ) => {
9292 process . env . FIRESTORE_EMULATOR_HOST = 'not-local-host:8080' ;
9393
94- await test . firestore . clearFirestoreData ( { projectId : 'not-a-project' } ) ;
95-
96- expect ( fakeHttpRequestMethod . calledOnceWith ( {
97- hostname : 'not-local-host' ,
98- method : 'DELETE' ,
99- path : '/emulator/v1/projects/not-a-project/databases/(default)/documents' ,
100- port : '8080'
101- } ) ) . to . be . true ;
94+ await test . firestore . clearFirestoreData ( { projectId : 'not-a-project' } ) ;
95+
96+ expect (
97+ fakeHttpRequestMethod . calledOnceWith ( {
98+ hostname : 'not-local-host' ,
99+ method : 'DELETE' ,
100+ path :
101+ '/emulator/v1/projects/not-a-project/databases/(default)/documents' ,
102+ port : '8080' ,
103+ } )
104+ ) . to . be . true ;
102105 } ) ;
103106
104107 it ( 'should use host name from FIREBASE_FIRESTORE_EMULATOR_ADDRESS env in clearFirestoreData' , async ( ) => {
105108 process . env . FIREBASE_FIRESTORE_EMULATOR_ADDRESS = 'custom-host:9090' ;
106109
107- await test . firestore . clearFirestoreData ( { projectId : 'not-a-project' } ) ;
108-
109- expect ( fakeHttpRequestMethod . calledOnceWith ( {
110- hostname : 'custom-host' ,
111- method : 'DELETE' ,
112- path : '/emulator/v1/projects/not-a-project/databases/(default)/documents' ,
113- port : '9090'
114- } ) ) . to . be . true ;
110+ await test . firestore . clearFirestoreData ( { projectId : 'not-a-project' } ) ;
111+
112+ expect (
113+ fakeHttpRequestMethod . calledOnceWith ( {
114+ hostname : 'custom-host' ,
115+ method : 'DELETE' ,
116+ path :
117+ '/emulator/v1/projects/not-a-project/databases/(default)/documents' ,
118+ port : '9090' ,
119+ } )
120+ ) . to . be . true ;
115121 } ) ;
116122} ) ;
0 commit comments