-
Notifications
You must be signed in to change notification settings - Fork 106
Audit and update dependencies #136
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. I added a question but no changes are required. I am merging after I get my answer 🙂
|
||
const clearIntervalSpy = sinon.spy(global, 'clearInterval'); | ||
|
||
afterAll(cleanup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity? Why was this afterAll
split required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but @testing-library/dom
changed, and If you do not add the cleanup
directly to the afterAll
or afterEach
, but run it in a function (it does not matter if it is an arrow function or not) the cleanup
will lose the scope of the document
so it is unable to find the body
and clean it up, and the function breaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we could have our tests isolated so we would not need to use cleanup
at all. Maybe I should start working on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it and also tried it out. I also have no idea why it does that. Could you add a comment on top of these separated afterAll/afterEach cases that explains why they are necessary and warns future devs to do not merge them into single functions? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
🎉 This PR is included in version 6.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.