@@ -379,6 +379,16 @@ describe('Settings', () => {
379
379
expect ( db . _getSettings ( ) . experimentalAutoDetectLongPolling ) . to . be . false ;
380
380
} ) ;
381
381
382
+ it ( 'long polling autoDetect=null should be coerced to false' , ( ) => {
383
+ // Use a new instance of Firestore in order to configure settings.
384
+ const db = newTestFirestore ( ) ;
385
+ db . _setSettings ( {
386
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
387
+ experimentalAutoDetectLongPolling : null as any
388
+ } ) ;
389
+ expect ( db . _getSettings ( ) . experimentalAutoDetectLongPolling ) . to . be . false ;
390
+ } ) ;
391
+
382
392
it ( 'long polling force=[something truthy] should be coerced to true' , ( ) => {
383
393
// Use a new instance of Firestore in order to configure settings.
384
394
const db = newTestFirestore ( ) ;
@@ -399,6 +409,16 @@ describe('Settings', () => {
399
409
expect ( db . _getSettings ( ) . experimentalForceLongPolling ) . to . be . false ;
400
410
} ) ;
401
411
412
+ it ( 'long polling force=null should be coerced to false' , ( ) => {
413
+ // Use a new instance of Firestore in order to configure settings.
414
+ const db = newTestFirestore ( ) ;
415
+ db . _setSettings ( {
416
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
417
+ experimentalForceLongPolling : null as any
418
+ } ) ;
419
+ expect ( db . _getSettings ( ) . experimentalForceLongPolling ) . to . be . false ;
420
+ } ) ;
421
+
402
422
it ( 'gets settings from useEmulator' , ( ) => {
403
423
// Use a new instance of Firestore in order to configure settings.
404
424
const db = newTestFirestore ( ) ;
0 commit comments