-
Notifications
You must be signed in to change notification settings - Fork 469
test: Leaking test #884
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
Comments
Good catch. A PR would be appreciated! |
ph-fritsche
added a commit
to ph-fritsche/dom-testing-library
that referenced
this issue
Feb 3, 2021
ph-fritsche
added a commit
to ph-fritsche/dom-testing-library
that referenced
this issue
Feb 3, 2021
ph-fritsche
added a commit
to ph-fritsche/dom-testing-library
that referenced
this issue
Feb 3, 2021
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@testing-library/dom
version: master = v7.29.4Relevant code or config:
This test leaks
setTimeout
so that tests added below are not run by jest.dom-testing-library/src/__tests__/helpers.js
Line 78 in 5bc9364
What you did:
Added tests for a pull request.
What happened:
Jest fails to
setTimeout
for subsequent tests.Adding a
describe
block withtest
, the tests are ignored without error messages.Adding a
describe
block withtest.only
reveals the problem.Suggested solution:
Enclose the tests in a
describe
block and definebeforeAll
/afterEach
to properly clean up after the test.The text was updated successfully, but these errors were encountered: