@@ -681,10 +681,10 @@ describe('RemoteConfig', () => {
681
681
} ) ;
682
682
} ) ;
683
683
684
- it ( 'should resolve with template when Version updateTime contains only 3 ms places' , ( ) => {
684
+ it ( 'should resolve with template when Version updateTime contains 3 fractional secs places' , ( ) => {
685
685
const response = deepCopy ( REMOTE_CONFIG_RESPONSE ) ;
686
686
const versionInfo = deepCopy ( VERSION_INFO ) ;
687
- versionInfo . updateTime = '2020-11-03T20:24:15 .203Z' ;
687
+ versionInfo . updateTime = '2020-10-03T17:14:10 .203Z' ;
688
688
response . version = versionInfo ;
689
689
const stub = sinon
690
690
. stub ( RemoteConfigApiClient . prototype , operationName )
@@ -703,14 +703,14 @@ describe('RemoteConfig', () => {
703
703
704
704
} ) ;
705
705
expect ( version . description ) . to . equal ( 'production version' ) ;
706
- expect ( version . updateTime ) . to . equal ( 'Tue , 03 Nov 2020 20:24:15 GMT' ) ;
706
+ expect ( version . updateTime ) . to . equal ( 'Sat , 03 Oct 2020 17:14:10 GMT' ) ;
707
707
} ) ;
708
708
} ) ;
709
709
710
- it ( 'should resolve with template when Version updateTime contains 6 ms places' , ( ) => {
710
+ it ( 'should resolve with template when Version updateTime contains 6 fractional secs places' , ( ) => {
711
711
const response = deepCopy ( REMOTE_CONFIG_RESPONSE ) ;
712
712
const versionInfo = deepCopy ( VERSION_INFO ) ;
713
- versionInfo . updateTime = '2020-11-13T17 :01:36.541527Z' ;
713
+ versionInfo . updateTime = '2020-08-14T17 :01:36.541527Z' ;
714
714
response . version = versionInfo ;
715
715
const stub = sinon
716
716
. stub ( RemoteConfigApiClient . prototype , operationName )
@@ -729,7 +729,33 @@ describe('RemoteConfig', () => {
729
729
730
730
} ) ;
731
731
expect ( version . description ) . to . equal ( 'production version' ) ;
732
- expect ( version . updateTime ) . to . equal ( 'Fri, 13 Nov 2020 17:01:36 GMT' ) ;
732
+ expect ( version . updateTime ) . to . equal ( 'Fri, 14 Aug 2020 17:01:36 GMT' ) ;
733
+ } ) ;
734
+ } ) ;
735
+
736
+ it ( 'should resolve with template when Version updateTime contains 9 fractional secs places' , ( ) => {
737
+ const response = deepCopy ( REMOTE_CONFIG_RESPONSE ) ;
738
+ const versionInfo = deepCopy ( VERSION_INFO ) ;
739
+ versionInfo . updateTime = '2020-11-15T06:57:26.342763941Z' ;
740
+ response . version = versionInfo ;
741
+ const stub = sinon
742
+ . stub ( RemoteConfigApiClient . prototype , operationName )
743
+ . resolves ( response ) ;
744
+ stubs . push ( stub ) ;
745
+
746
+ return rcOperation ( )
747
+ . then ( ( template ) => {
748
+ expect ( template . etag ) . to . equal ( 'etag-123456789012-5' ) ;
749
+
750
+ const version = template . version ! ;
751
+ expect ( version . versionNumber ) . to . equal ( '86' ) ;
752
+ expect ( version . updateOrigin ) . to . equal ( 'ADMIN_SDK_NODE' ) ;
753
+ expect ( version . updateType ) . to . equal ( 'INCREMENTAL_UPDATE' ) ;
754
+ expect ( version . updateUser ) . to . deep . equal ( {
755
+
756
+ } ) ;
757
+ expect ( version . description ) . to . equal ( 'production version' ) ;
758
+ expect ( version . updateTime ) . to . equal ( 'Sun, 15 Nov 2020 06:57:26 GMT' ) ;
733
759
} ) ;
734
760
} ) ;
735
761
}
0 commit comments