-
Notifications
You must be signed in to change notification settings - Fork 55
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
chore(logger): expose logger.__buffer__={}, add tests #69
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.
Do we need to back out the /dist
folder changes?
Whoops put a few comments on dist files. I agree with @wsbrunson we will want to back those out since the publish does it automatically. |
8225b7a
to
badf9ea
Compare
3. Locally merge (or rebase) the upstream branch into your topic branch: `$ git pull upstream && git merge`. | ||
4. Push your topic branch up to your fork: `$ git push origin <topic-branch-name>`. | ||
5. Open a [Pull Request](https://help.github.com/articles/using-pull-requests) with a clear title and description. | ||
1. Don't check in your `./dist` folder. You can use this command to ignore it without modifying the .gitignore file: `git update-index —assume-unchanged dist/*.*` |
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.
Only change here: Added first line. Updated numbers
@westeezy Made the recommended changes |
This commit exposes the private buffers publicly _buffer={events=[],metrics=[],tracking=[]} on the logger instance. In `3.x` this was exposed on `$beaver` but was removed in later versions. Adding this allows us much greater flexibility in testing as well as allows consuming libraries to assert that they sent the correct events to the buffer for logging. This change also allows us to add a lot more tests easily (code coverage jumped to 73%).
f04bf70
to
cc72c85
Compare
All issues resolved. This should be good to go now. Thanks folks! |
This PR exposes the private buffers publicly (
__buffer__={events=[],metrics=[],tracking=[]}
) on the logger instance.In
3.x
this was exposed on$beaver
but was removed in later versions.Adding this allows us much greater flexibility in testing as well as allows consuming libraries to assert that they sent the correct events to the buffer for logging.
This change also allows us to add a lot more tests easily (code coverage jumped to 73%).
Before:
After:
New test cases added