Async/await with Jest - What is the right way to return?

Hello there,

This snipped has been marked as “code smell”. Could someone give me some advise? How can I fix the issue as such?

Here is analytics link.

@ndaidong Hello and welcome to the Community!

In this case, in order to fix the code smell you should just return directly the result of the await like this:

return await extract(url)

You can read more in the corresponding JS rule here.