Description
@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)