Questions tagged [flush-promises]
3 questions
0
votes
0 answers
How to test localstack with jest? (trigger sqs messages asynchronously)
We have a Nestjs app using Localstack to develop locally sending emails with SES, and SQS. We are writing an e2e test, which basically sends a message to queue A, SES receives the message, publishes it, and sends an event (like delivered, bounced)…

AlbertMunichMar
- 1,680
- 5
- 25
- 49
0
votes
0 answers
About Aync,Promise ,Await
result = {};
Promise.all(data2.map(async function(subcat) {
await productModel.find({ subcategory_id: subcat._id }, function(err4, data4) {
result.sub_category = subcat;
result.product = data4;
});
return…
-1
votes
3 answers
How to turn a callback function into a promise
I need to make this code return a promise. Idk how to do that and i wanna learn. If you can, i would also need some explications, thanks!
var url = "....";
function showMoviesList(callbackFunction){
fetch(url + "/movies", {
method: "GET",
…

Andrew
- 11