@@ -681,7 +681,7 @@ describe('RemoteConfig', () => {
681681 } ) ;
682682 } ) ;
683683
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' , ( ) => {
685685 const response = deepCopy ( REMOTE_CONFIG_RESPONSE ) ;
686686 const versionInfo = deepCopy ( VERSION_INFO ) ;
687687 versionInfo . updateTime = '2020-11-03T20:24:15.203Z' ;
@@ -707,7 +707,7 @@ describe('RemoteConfig', () => {
707707 } ) ;
708708 } ) ;
709709
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' , ( ) => {
711711 const response = deepCopy ( REMOTE_CONFIG_RESPONSE ) ;
712712 const versionInfo = deepCopy ( VERSION_INFO ) ;
713713 versionInfo . updateTime = '2020-11-13T17:01:36.541527Z' ;
@@ -732,5 +732,31 @@ describe('RemoteConfig', () => {
732732 expect ( version . updateTime ) . to . equal ( 'Fri, 13 Nov 2020 17:01:36 GMT' ) ;
733733 } ) ;
734734 } ) ;
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-13T17:01:36.541527341Z' ;
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 ( 'Fri, 13 Nov 2020 17:01:36 GMT' ) ;
759+ } ) ;
760+ } ) ;
735761 }
736762} ) ;
0 commit comments