@@ -93,6 +93,7 @@ describe('from/dynamodb.js', () => {
9393 type : 'thing-created' ,
9494 partitionKey : '1' ,
9595 timestamp : 1572832690000 ,
96+ approximateCreationTimestamp : 1572832690000 ,
9697 tags : {
9798 region : 'us-west-2' ,
9899 } ,
@@ -111,7 +112,7 @@ describe('from/dynamodb.js', () => {
111112 . done ( done ) ;
112113 } ) ;
113114
114- it ( 'should prefer image timestamp if present on INSERT ' , ( done ) => {
115+ it ( 'should prefer image timestamp if present' , ( done ) => {
115116 const events = toDynamodbRecords ( [
116117 {
117118 timestamp : 1572832690 ,
@@ -124,7 +125,7 @@ describe('from/dynamodb.js', () => {
124125 sk : 'thing' ,
125126 discriminator : 'thing' ,
126127 name : 'n1' ,
127- timestamp : 1572832690001
128+ timestamp : 1572832690001 ,
128129 // insert in the current region will not have the awsregion field
129130 } ,
130131 } ,
@@ -188,6 +189,9 @@ describe('from/dynamodb.js', () => {
188189 name : {
189190 S : 'n1' ,
190191 } ,
192+ timestamp : {
193+ N : '1572832690001' ,
194+ } ,
191195 } ,
192196 OldImage : undefined ,
193197 SequenceNumber : '0' ,
@@ -198,7 +202,8 @@ describe('from/dynamodb.js', () => {
198202 id : '0' ,
199203 type : 'thing-created' ,
200204 partitionKey : '1' ,
201- timestamp : 1572832690000 ,
205+ timestamp : 1572832690001 ,
206+ approximateCreationTimestamp : 1572832690000 ,
202207 tags : {
203208 region : 'us-west-2' ,
204209 } ,
@@ -208,6 +213,7 @@ describe('from/dynamodb.js', () => {
208213 sk : 'thing' ,
209214 discriminator : 'thing' ,
210215 name : 'n1' ,
216+ timestamp : 1572832690001 ,
211217 } ,
212218 old : undefined ,
213219 } ,
@@ -334,6 +340,7 @@ describe('from/dynamodb.js', () => {
334340 type : 'thing-updated' ,
335341 partitionKey : '1' ,
336342 timestamp : 1572832690000 ,
343+ approximateCreationTimestamp : 1572832690000 ,
337344 tags : {
338345 region : 'us-west-2' ,
339346 } ,
@@ -440,6 +447,7 @@ describe('from/dynamodb.js', () => {
440447 type : 'thing-deleted' ,
441448 partitionKey : '1' ,
442449 timestamp : 1572832690000 ,
450+ approximateCreationTimestamp : 1572832690000 ,
443451 tags : {
444452 region : 'us-west-2' ,
445453 } ,
@@ -549,6 +557,7 @@ describe('from/dynamodb.js', () => {
549557 type : 'thing-deleted' ,
550558 partitionKey : '1' ,
551559 timestamp : 1572832690000 ,
560+ approximateCreationTimestamp : 1572832690000 ,
552561 tags : {
553562 region : 'us-west-2' ,
554563 } ,
@@ -673,6 +682,7 @@ describe('from/dynamodb.js', () => {
673682 type : 'thing-undeleted' ,
674683 partitionKey : '1' ,
675684 timestamp : 1572832690000 ,
685+ approximateCreationTimestamp : 1572832690000 ,
676686 tags : {
677687 region : 'us-west-2' ,
678688 } ,
@@ -771,6 +781,7 @@ describe('from/dynamodb.js', () => {
771781 type : 'thing-deleted' ,
772782 partitionKey : '1' ,
773783 timestamp : 1573005490000 ,
784+ approximateCreationTimestamp : 1573005490000 ,
774785 tags : {
775786 region : 'us-west-2' ,
776787 } ,
@@ -948,6 +959,7 @@ describe('from/dynamodb.js', () => {
948959 type : 'thing-updated' ,
949960 partitionKey : '1' ,
950961 timestamp : 1572832690000 ,
962+ approximateCreationTimestamp : 1572832690000 ,
951963 tags : {
952964 region : 'us-west-2' ,
953965 } ,
@@ -1029,6 +1041,7 @@ describe('from/dynamodb.js', () => {
10291041 type : 'thing-updated' ,
10301042 partitionKey : '1' ,
10311043 timestamp : 1572832990000 ,
1044+ approximateCreationTimestamp : 1572832990000 ,
10321045 tags : {
10331046 region : 'us-east-1' ,
10341047 } ,
0 commit comments