You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Is it possible to execute the original implementation of the method from within the mock? It would help simulate events which are otherwise performed in the cloud (like DynamoDB Streams, etc.). I'm using Dynalite to run tests against DynamoDB and the ability to call the original method would help a lot.
Here's an example:
AWS.mock("DynamoDB","putItem",function(params,callback,original){// Call original implementationconstresult=original(params);// Now insert data to Elasticsearch (which is otherwise performed in a lambda triggered by DynamoDB)elastic.index(result)// And finally execute mock callbackcallback(result);});
There are other use cases as well, like conditionally returning a mocked result, and executing original otherwise...
Thanks for any info!
Cheers 🍻
The text was updated successfully, but these errors were encountered:
Hi! Is it possible to execute the original implementation of the method from within the mock? It would help simulate events which are otherwise performed in the cloud (like DynamoDB Streams, etc.). I'm using Dynalite to run tests against DynamoDB and the ability to call the original method would help a lot.
Here's an example:
There are other use cases as well, like conditionally returning a mocked result, and executing original otherwise...
Thanks for any info!
Cheers 🍻
The text was updated successfully, but these errors were encountered: