Relative Content

Tag Archive for typescriptamazon-dynamodbnestjsdynamoose

How to mock an Item with a specific updateAt value in dynamoose?

I am adding e2e to a micro service. Part of the functionality that I am implementing requires that I check that an item was updated more than 2 hours ago. When I create the mocked object with a date that is 6 hours older than current time and set updatedAt to it, that value is overriden by dynamoose. How can I make that the object takes the mocked data that I want and doesn’t change it?