-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test suite failed to run. Your test suite must contain at least one test. #7623
Comments
Tests must be defined synchronously, so you'll need to move |
Took me a month, but I finally had some time to do something against these errors #7852 😄 |
A bit late but jest still fails with async and the documentation says very clear how to use async code. Either you have to remove this from the docs or you have to fix this issue. For example, let's say that fetchData, instead of using a callback, returns a promise that is supposed to resolve to the string 'peanut butter'. We could test it with: ` I am doing my tests with promises and i am receiving the same error. |
|
Ohh ok I understand. Thanks a lot |
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. |
🐛 Bug Report
Jest cannot find unit tests in file when using supertest inside. Example from the Jest for web frameworks example.
To Reproduce
createServer
returnsPromise<Express>
, an express app.This snippet currently passes when running
jest
This snippet (almost identical to docs and blogs) fails because
jest
can't find any tests in the file.Error
Expected behavior
Jest either passes running my unit tests or it fails from running my unit tests. (It currently fails from not running my unit tests)
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: