@@ -14,7 +14,7 @@ describe('providers/firestore', () => {
14
14
test = fft ( ) ;
15
15
fakeHttpResponse = {
16
16
statusCode : 200 ,
17
- on : ( ( event , cb ) => cb ( ) )
17
+ on : ( event , cb ) => cb ( ) ,
18
18
} ;
19
19
fakeHttpRequestMethod = sinon . fake ( ( config , cb ) => {
20
20
cb ( fakeHttpResponse ) ;
@@ -91,26 +91,32 @@ describe('providers/firestore', () => {
91
91
it ( 'should use host name from FIRESTORE_EMULATOR_HOST env in clearFirestoreData' , async ( ) => {
92
92
process . env . FIRESTORE_EMULATOR_HOST = 'not-local-host:8080' ;
93
93
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 ;
102
105
} ) ;
103
106
104
107
it ( 'should use host name from FIREBASE_FIRESTORE_EMULATOR_ADDRESS env in clearFirestoreData' , async ( ) => {
105
108
process . env . FIREBASE_FIRESTORE_EMULATOR_ADDRESS = 'custom-host:9090' ;
106
109
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 ;
115
121
} ) ;
116
122
} ) ;
0 commit comments