@@ -93,6 +93,7 @@ describe('from/dynamodb.js', () => {
93
93
type : 'thing-created' ,
94
94
partitionKey : '1' ,
95
95
timestamp : 1572832690000 ,
96
+ approximateCreationTimestamp : 1572832690000 ,
96
97
tags : {
97
98
region : 'us-west-2' ,
98
99
} ,
@@ -111,7 +112,7 @@ describe('from/dynamodb.js', () => {
111
112
. done ( done ) ;
112
113
} ) ;
113
114
114
- it ( 'should prefer image timestamp if present on INSERT ' , ( done ) => {
115
+ it ( 'should prefer image timestamp if present' , ( done ) => {
115
116
const events = toDynamodbRecords ( [
116
117
{
117
118
timestamp : 1572832690 ,
@@ -124,7 +125,7 @@ describe('from/dynamodb.js', () => {
124
125
sk : 'thing' ,
125
126
discriminator : 'thing' ,
126
127
name : 'n1' ,
127
- timestamp : 1572832690001
128
+ timestamp : 1572832690001 ,
128
129
// insert in the current region will not have the awsregion field
129
130
} ,
130
131
} ,
@@ -188,6 +189,9 @@ describe('from/dynamodb.js', () => {
188
189
name : {
189
190
S : 'n1' ,
190
191
} ,
192
+ timestamp : {
193
+ N : '1572832690001' ,
194
+ } ,
191
195
} ,
192
196
OldImage : undefined ,
193
197
SequenceNumber : '0' ,
@@ -198,7 +202,8 @@ describe('from/dynamodb.js', () => {
198
202
id : '0' ,
199
203
type : 'thing-created' ,
200
204
partitionKey : '1' ,
201
- timestamp : 1572832690000 ,
205
+ timestamp : 1572832690001 ,
206
+ approximateCreationTimestamp : 1572832690000 ,
202
207
tags : {
203
208
region : 'us-west-2' ,
204
209
} ,
@@ -208,6 +213,7 @@ describe('from/dynamodb.js', () => {
208
213
sk : 'thing' ,
209
214
discriminator : 'thing' ,
210
215
name : 'n1' ,
216
+ timestamp : 1572832690001 ,
211
217
} ,
212
218
old : undefined ,
213
219
} ,
@@ -334,6 +340,7 @@ describe('from/dynamodb.js', () => {
334
340
type : 'thing-updated' ,
335
341
partitionKey : '1' ,
336
342
timestamp : 1572832690000 ,
343
+ approximateCreationTimestamp : 1572832690000 ,
337
344
tags : {
338
345
region : 'us-west-2' ,
339
346
} ,
@@ -440,6 +447,7 @@ describe('from/dynamodb.js', () => {
440
447
type : 'thing-deleted' ,
441
448
partitionKey : '1' ,
442
449
timestamp : 1572832690000 ,
450
+ approximateCreationTimestamp : 1572832690000 ,
443
451
tags : {
444
452
region : 'us-west-2' ,
445
453
} ,
@@ -549,6 +557,7 @@ describe('from/dynamodb.js', () => {
549
557
type : 'thing-deleted' ,
550
558
partitionKey : '1' ,
551
559
timestamp : 1572832690000 ,
560
+ approximateCreationTimestamp : 1572832690000 ,
552
561
tags : {
553
562
region : 'us-west-2' ,
554
563
} ,
@@ -673,6 +682,7 @@ describe('from/dynamodb.js', () => {
673
682
type : 'thing-undeleted' ,
674
683
partitionKey : '1' ,
675
684
timestamp : 1572832690000 ,
685
+ approximateCreationTimestamp : 1572832690000 ,
676
686
tags : {
677
687
region : 'us-west-2' ,
678
688
} ,
@@ -771,6 +781,7 @@ describe('from/dynamodb.js', () => {
771
781
type : 'thing-deleted' ,
772
782
partitionKey : '1' ,
773
783
timestamp : 1573005490000 ,
784
+ approximateCreationTimestamp : 1573005490000 ,
774
785
tags : {
775
786
region : 'us-west-2' ,
776
787
} ,
@@ -948,6 +959,7 @@ describe('from/dynamodb.js', () => {
948
959
type : 'thing-updated' ,
949
960
partitionKey : '1' ,
950
961
timestamp : 1572832690000 ,
962
+ approximateCreationTimestamp : 1572832690000 ,
951
963
tags : {
952
964
region : 'us-west-2' ,
953
965
} ,
@@ -1029,6 +1041,7 @@ describe('from/dynamodb.js', () => {
1029
1041
type : 'thing-updated' ,
1030
1042
partitionKey : '1' ,
1031
1043
timestamp : 1572832990000 ,
1044
+ approximateCreationTimestamp : 1572832990000 ,
1032
1045
tags : {
1033
1046
region : 'us-east-1' ,
1034
1047
} ,
0 commit comments