jest-dynamodb
jest-dynamodb copied to clipboard
UnknownEndpoint error
Hi
I am using this package for testing dynamo operations in a serverless framework project. My tests were timing out, after increasing the timeout value i am getting the following error:
UnknownEndpoint: Inaccessible host: 'localhost'. This service may not be available in the 'local-env' region. My configuration can be found here
So it seems like the local instance of dynamo is not running along with my tests. If I use serverless-offline, and start the "offline server" - my tests pass.
Is there any specific configuration required for this work in a serverless framework project that i might have missed?
Any advise would be much appreciated
Not sure if this will help your case, but I solved this by directly including const dynamoDbPreset = require("@shelf/jest-dynamodb/jest-preset");
as part of the Jest configuration.