question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SimenBcommented, Mar 2, 2022

I think we should just have a plain async-await section first, then we can bring in resolves and rejects afterwards

0reactions
github-actions[bot]commented, May 12, 2022

This 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found