@@ -90,11 +90,13 @@ describe('githubEventsToS3', () => {
90
90
jest . spyOn ( Date . prototype , 'getDate' ) . mockReturnValue ( 4 ) ;
91
91
jest . spyOn ( Date . prototype , 'getMonth' ) . mockReturnValue ( 8 ) ;
92
92
jest . spyOn ( Date . prototype , 'getFullYear' ) . mockReturnValue ( 2024 ) ;
93
+ jest . spyOn ( Date . prototype , 'toISOString' ) . mockReturnValue ( '2024-10-04T21:00:06.875Z' ) ;
93
94
94
95
await githubEventsToS3 ( app , context , resource ) ;
95
96
96
97
expect ( PutObjectCommand ) . toHaveBeenCalledWith (
97
98
expect . objectContaining ( {
99
+ Body : expect . stringMatching ( '"uploaded_at":"2024-10-04T21:00:06.875Z"' ) ,
98
100
Key : expect . stringMatching ( `name.action/2024-09-04/repo-id` ) ,
99
101
} ) ,
100
102
) ;
@@ -115,11 +117,13 @@ describe('githubEventsToS3', () => {
115
117
jest . spyOn ( Date . prototype , 'getDate' ) . mockReturnValue ( 4 ) ;
116
118
jest . spyOn ( Date . prototype , 'getMonth' ) . mockReturnValue ( 8 ) ;
117
119
jest . spyOn ( Date . prototype , 'getFullYear' ) . mockReturnValue ( 2024 ) ;
120
+ jest . spyOn ( Date . prototype , 'toISOString' ) . mockReturnValue ( '2024-10-04T21:00:06.875Z' ) ;
118
121
119
122
await githubEventsToS3 ( app , context , resource ) ;
120
123
121
124
expect ( PutObjectCommand ) . toHaveBeenCalledWith (
122
125
expect . objectContaining ( {
126
+ Body : expect . stringMatching ( '"uploaded_at":"2024-10-04T21:00:06.875Z"' ) ,
123
127
Key : expect . stringMatching ( `name/2024-09-04/repo-id` ) ,
124
128
} ) ,
125
129
) ;
0 commit comments