File tree Expand file tree Collapse file tree 1 file changed +22
-18
lines changed
packages/firestore/test/integration/api Expand file tree Collapse file tree 1 file changed +22
-18
lines changed Original file line number Diff line number Diff line change @@ -145,26 +145,30 @@ apiDescribe('Validation:', (persistence: boolean) => {
145
145
}
146
146
) ;
147
147
148
- validationIt ( persistence , 'disallows changing settings after use' , db => {
149
- let errorMsg =
150
- 'Firestore has already been started and its settings can no ' +
151
- 'longer be changed. ' ;
148
+ validationIt (
149
+ persistence ,
150
+ 'disallows changing settings after use' ,
151
+ async db => {
152
+ let errorMsg =
153
+ 'Firestore has already been started and its settings can no ' +
154
+ 'longer be changed. ' ;
155
+
156
+ if ( usesFunctionalApi ( ) ) {
157
+ errorMsg +=
158
+ 'initializeFirestore() cannot be called after calling ' +
159
+ 'getFirestore()' ;
160
+ } else {
161
+ errorMsg +=
162
+ 'You can only call settings() before calling any other ' +
163
+ 'methods on a Firestore object.' ;
164
+ }
152
165
153
- if ( usesFunctionalApi ( ) ) {
154
- errorMsg +=
155
- 'initializeFirestore() cannot be called after calling ' +
156
- 'getFirestore()' ;
157
- } else {
158
- errorMsg +=
159
- 'You can only call settings() before calling any other ' +
160
- 'methods on a Firestore object.' ;
166
+ await db . doc ( 'foo/bar' ) . set ( { } ) ;
167
+ expect ( ( ) =>
168
+ db . settings ( { host : 'something-else.example.com' } )
169
+ ) . to . throw ( errorMsg ) ;
161
170
}
162
-
163
- db . doc ( 'foo/bar' ) . set ( { } ) ;
164
- expect ( ( ) =>
165
- db . settings ( { host : 'something-else.example.com' } )
166
- ) . to . throw ( errorMsg ) ;
167
- } ) ;
171
+ ) ;
168
172
169
173
validationIt ( persistence , 'enforces minimum cache size' , ( ) => {
170
174
const db = newTestFirestore ( 'test-project' ) ;
You can’t perform that action at this time.
0 commit comments