node.js – aws-sdk-client-mock not mocking DynamoDB for Javascript AWS SDK v3

I was following aws-sdk-client-mock to write a unit test case for GetCommand in javascript aws-sdk-v3. However, while following the documentation, I observed it’s not mocking but its actually going to AWS and giving error like ‘ResourceNotFoundException: Requested resource not found’

The same thing was discussed here in the comments section: stack-overflow-aws-sdk-client-mock

Any help here. Thanks.

Below are the version that I’m using:

@aws-sdk/client-dynamodb": "3.584.0",
"@aws-sdk/lib-dynamodb": "3.584.0",
"aws-sdk-client-mock": "^4.0.1"

Read more here: Source link