(type, options)
| 23 | } |
| 24 | |
| 25 | function createDynamoDBRecord(type, options) { |
| 26 | return { |
| 27 | "eventID": "1", |
| 28 | "eventVersion": "1.0", |
| 29 | "dynamodb": { |
| 30 | "Keys": { |
| 31 | "Id": { |
| 32 | "N": "101" |
| 33 | } |
| 34 | }, |
| 35 | "NewImage": { |
| 36 | "Message": { |
| 37 | "S": "New item!" |
| 38 | }, |
| 39 | "Id": { |
| 40 | "N": "101" |
| 41 | } |
| 42 | }, |
| 43 | "StreamViewType": "NEW_AND_OLD_IMAGES", |
| 44 | "SequenceNumber": "111", |
| 45 | "SizeBytes": 26 |
| 46 | }, |
| 47 | "awsRegion": options.awsRegion, |
| 48 | "eventName": type, |
| 49 | "eventSourceARN": options.eventSourceARN, |
| 50 | "eventSource": "aws:dynamodb" |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | function setDefaults(options, type) { |
| 55 | var defaultOptions = { |
no outgoing calls
no test coverage detected