@@ -15,7 +15,7 @@ import {
15
15
} from '@eppo/js-client-sdk-common' ;
16
16
import * as td from 'testdouble' ;
17
17
18
- const { POLL_INTERVAL_MS , POLL_JITTER_PCT } = constants ;
18
+ const { DEFAULT_POLL_INTERVAL_MS , POLL_JITTER_PCT } = constants ;
19
19
20
20
import {
21
21
IAssignmentTestCase ,
@@ -406,7 +406,7 @@ describe('initialization options', () => {
406
406
let mockLogger : IAssignmentLogger ;
407
407
let returnUfc = readMockUfcResponse ; // function so it can be overridden per-test
408
408
409
- const maxRetryDelay = POLL_INTERVAL_MS * POLL_JITTER_PCT ;
409
+ const maxRetryDelay = DEFAULT_POLL_INTERVAL_MS * POLL_JITTER_PCT ;
410
410
const mockConfigResponse = {
411
411
flags : {
412
412
[ obfuscatedFlagKey ] : mockObfuscatedUfcFlagConfig ,
@@ -492,7 +492,7 @@ describe('initialization options', () => {
492
492
expect ( client . getStringAssignment ( flagKey , 'subject' , { } , 'default-value' ) ) . toBe ( 'control' ) ;
493
493
494
494
// By default, no more calls
495
- await jest . advanceTimersByTimeAsync ( POLL_INTERVAL_MS * 10 ) ;
495
+ await jest . advanceTimersByTimeAsync ( DEFAULT_POLL_INTERVAL_MS * 10 ) ;
496
496
expect ( callCount ) . toBe ( 2 ) ;
497
497
} ) ;
498
498
@@ -577,7 +577,7 @@ describe('initialization options', () => {
577
577
await jest . advanceTimersByTimeAsync ( maxRetryDelay ) ;
578
578
579
579
// Should be polling
580
- await jest . advanceTimersByTimeAsync ( POLL_INTERVAL_MS * 10 ) ;
580
+ await jest . advanceTimersByTimeAsync ( DEFAULT_POLL_INTERVAL_MS * 10 ) ;
581
581
expect ( callCount ) . toBe ( 11 ) ;
582
582
} ) ;
583
583
@@ -609,7 +609,7 @@ describe('initialization options', () => {
609
609
) ;
610
610
611
611
// Expect no further configuration requests
612
- await jest . advanceTimersByTimeAsync ( POLL_INTERVAL_MS ) ;
612
+ await jest . advanceTimersByTimeAsync ( DEFAULT_POLL_INTERVAL_MS ) ;
613
613
expect ( callCount ) . toBe ( 1 ) ;
614
614
} ) ;
615
615
@@ -649,7 +649,7 @@ describe('initialization options', () => {
649
649
'default-value' ,
650
650
) ;
651
651
652
- await jest . advanceTimersByTimeAsync ( POLL_INTERVAL_MS ) ;
652
+ await jest . advanceTimersByTimeAsync ( DEFAULT_POLL_INTERVAL_MS ) ;
653
653
654
654
// Expect a new call from poller
655
655
expect ( callCount ) . toBe ( 3 ) ;
@@ -1025,7 +1025,7 @@ describe('initialization options', () => {
1025
1025
'default-value' ,
1026
1026
) ;
1027
1027
// Advance time so a poll happened and check again
1028
- await jest . advanceTimersByTimeAsync ( POLL_INTERVAL_MS ) ;
1028
+ await jest . advanceTimersByTimeAsync ( DEFAULT_POLL_INTERVAL_MS ) ;
1029
1029
expect ( getInstance ( ) . getStringAssignment ( flagKey , 'subject' , { } , 'default-value' ) ) . toBe (
1030
1030
'control' ,
1031
1031
) ;
0 commit comments