Skip to content
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

Provide a better experience with lifecycle hooks #1249

Closed
timdeschryver opened this issue Nov 14, 2023 · 3 comments · Fixed by #1252
Closed

Provide a better experience with lifecycle hooks #1249

timdeschryver opened this issue Nov 14, 2023 · 3 comments · Fixed by #1252
Labels

Comments

@timdeschryver
Copy link
Member

@MatanBobi (and @timdeschryver, if you're still interested in Angular's implementation), it seems like this change could potentially run the risk of cluttering the logs for developers who intentionally aren't using the automatic cleanup functions. (For example, I'm using vitest, which by default doesn't have globals enabled. But I'm sticking with Vitest's defaults intentionally.) Particularly, this warning will be logged for every single test file that tests React components.

Is it possible to only display this warning once per call to jest/vitest/etc.? For instance, is there a way that an ENV var (e.g., *TL_GLOBAL_WARNING_LOGGED) could be set (which only lasts the lifetime of npx jest, npx vitest, etc.)? Or maybe something else would be possible?

Originally posted by @ITenthusiasm in #1244 (comment)

@MatanBobi
Copy link
Member

MatanBobi commented Nov 14, 2023

Thanks @timdeschryver for opening this and thanks @ITenthusiasm for raising it.
I'll try to get to this one tomorrow evening :) If anyone wants to take it before, feel free.

Copy link

🎉 This issue has been resolved in version 14.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MatanBobi
Copy link
Member

@timdeschryver Do we want to re-open this to think of a better way to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants