Add support for promises in `expect`
See original GitHub issueRight now, if you have a promise in expect
(for, say, an async function) it will be run but errors will not be detected.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:6
Top Results From Across the Web
Add support for asserting that a promise has resolved ... - GitHub
Currently, there is no declarative and easy way to check if a promise resolves or rejects. What is the expected behavior?
Read more >How to support promises in Internet Explorer 11?
Use a JS transpiler (like babel) or don't use ES6 features. For Promise support you can use a library like bluebird. (BTW, note...
Read more >Using promises - JavaScript - MDN Web Docs
A Promise is an object representing the eventual completion or failure of an asynchronous operation. Since most people are consumers of ...
Read more >120260 – Add support for Promises - WebKit Bugzilla
Add support for Promises. Comment 1 Sam Weinig 2013-08-24 21:02:51 ... u'LayoutTests/fast/js/Promise-resolve-with-then-reject-expected.txt', ...
Read more >Unit Testing Async Calls and Promises with Jasmine - Medium
This post will show you a simple approach to test a JavaScript service with an exported function that returns a promise. Unit testing...
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
@LegNeato It seems the problem is not solved.
I‘m using supertest@4.0.2.
I find that the AssertionError will not be detected when I use async/await in expect.
I don’t know, it could have regressed since this was landed years ago. I only use Rust these days so sadly can’t help.