Rework asynchronous tests documentation
See original GitHub issue🚀 Feature Proposal
https://jestjs.io/docs/asynchronous
It currently says “The most common asynchronous pattern is callbacks.” This is wrong. We should put promises at the top, and callbacks last. We should probably lift up async-await
as well, before the example returning promises.
If you want to work on this, please state so in this issue so not multiple people start working on it, creating redundant work 🙂
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Testing Asynchronous Code - Jest
Testing Asynchronous Code. It's common in JavaScript for code to run asynchronously. When you have code that runs asynchronously, Jest needs ...
Read more >Asynchronous Tests and Expectations - Apple Developer
When the asynchronous task returns (for example, in a callback), perform assertions to confirm that the task's actual results meet your expected results....
Read more >Async Programming - Unit Testing Asynchronous Code
First, when testing the results of an asynchronous method, the important bit is the Task it returns. The async method uses its Task...
Read more >Async tests | Test Framework | 2.0.1-exp.2 - Unity - Manual
If you're new to asynchronous programming and its applications, see the Microsoft documentation for a comprehensive guide.
Read more >Async Methods - Testing Library
Several utilities are provided for dealing with asynchronous code. These can be useful to wait for an element to appear or disappear in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we should just have a plain
async-await
section first, then we can bring inresolves
andrejects
afterwardsThis issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.