-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: export initialized socket client #4304
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #4304 +/- ##
=======================================
Coverage 92.18% 92.18%
=======================================
Files 15 15
Lines 1549 1549
Branches 591 591
=======================================
Hits 1428 1428
Misses 112 112
Partials 9 9 Continue to review full report at Codecov.
|
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.
Let's fix lint.
I'm not sure if I should just do eslint ignore here, or should I do something more |
Just add |
@pmmmwh Can we add small test cases (where we try to get client) to avoid future regressions? |
Added test! |
29ad8cd
to
a7a2d38
Compare
Completely rebased onto latest HEAD + fixed commitlint issue 😄 |
Thanks |
For Bugs and Features; did you add new tests?
No new tests are added as I believe this is a simple change and no additional functionality is added, it just exposes a bit more of the private parts.Added a simple test for
null
value before init, and a "valid" client instance after init.Motivation / Use-Case
Fixes #4261
Fixes #4324
Additional Info
I chose the simplest way to expose the initialized client, so consumers can just import the file and use it - but I'm also ok with setting it to some globals (on
globalThis
/window
) if you think that's better (I'm unsure if mutable exports are implemented properly when compiled?).