Prevent logs from being outputed in our unit tests #1612
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our unit tests had become noisy with deprecation notices and RxPlayer log outputs.
That noise doesn't play well with how those unit tests report as we generally configure them to have a compact output in the terminal (with the idea that a passing test is not useful information but a breaking test is).
Those added logs break that compact output into a unreadable mess of uninteresting warnings, which I find especially problematic for tests.
So here, I remove the 2 culprits for those logs:
deprecation notices from vitest have been handled by updating the tests (though I'm not sure of why they print deprecation logs each time when the same deprecated logic is encountered multiple times, one signal would have been enough and preferable IMO)
All logger unit tests mock
console
functions now