-
Notifications
You must be signed in to change notification settings - Fork 584
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
Cleaning up console output from tests #2548
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 ok, if it passes RN CI
Co-Authored-By: Brian Munkholm <[email protected]>
Co-Authored-By: Brian Munkholm <[email protected]>
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.
This has definitely been a consistent annoyance; both in how spammy it is by default and how awkward it was to actually make it log more when debugging things.
The failing tests looks like a brittle test harness to me:
|
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.
its good
@kraenhansen yeah. lets merge it |
* Clearing the default Jasmin reporters removes dots * Removed setLogLevel calls from tests * Removed excessive logging * Removed setLogger call from notifier tests * Setting up the Realm.Sync logger once * Using the "debug" logger in session tests * Adding missing dependencies * Documenting changes * Adding a release note * Fixed issues reported by Codacy * Apply suggestions from code review Co-Authored-By: Brian Munkholm <[email protected]> * Update tests/js/session-tests.js Co-Authored-By: Brian Munkholm <[email protected]>
What, How & Why?
I was getting back to Realm JS and got annoyed that the output from the tests are bloated with console.logs and output from the Realm JS client itself. It turned out the
Realm.Sync
loggers got reset before each test executed (asRealm.clearTestState
was called): To ensure the logger is restored, this PR monkey-patchesRealm.clearTestState
to reset the logger and log level to appropriate levels.☑️ ToDos
Compatibility
label is updated or copied from previous entryBreaking
label has been applied or is not necessary