I am trying to add unit tests to one of my services. The problem i encountered is with using jest-dynamodb package (which is the jest goto solution in this case AFAIK).
To my understanding the package should run dynamod-local under the hood. But it seems like I have to manually start a local instance of dynamo for the tests that try to interact with dynamo to pass.
specifically, If i don’t start the local dynamo instance my tests exceed the default timeout of 5 seconds. if i elongate the timeout i get the following error:
UnknownEndpoint: Inaccessible host: 'localhost'. This service may not be available in the 'local-env' region.
I guess something in my configuration is wrong, but can’t seem to figure out exactly what it is. Any advise would be appreciated.
I’d also love to hear how others are testing dynamodb interactions.