Add additional websocket message types #606
Add additional websocket message types #606
Conversation
Hey @hjoelr, I am happy to add additional WebSocket types but we also need to have tests for the events when they occur. |
@bennycode Okay. I've started to look at how to do that. I'm thinking I would add more coinbase-pro-node/src/client/WebSocketClient.test.ts Lines 131 to 261 in 9f912cc
|
Hi @hjoelr, sorry for my late reply but I am currently on vacation (back to work next week). To add tests it's best to add more A full test run will also generate a "coverage/index.html" from where you can see which lines of code are covered by your test. Here is a good example how to check for a specific message type: coinbase-pro-node/src/client/WebSocketClient.test.ts Lines 176 to 190 in 9f912cc
|
Hi @hjoelr, I converted your PR to a draft because it's still in progress. |
Okay, no problem. I just haven't been able to get time to finish this off. 😔 Hopefully soon. |
Sure, take your time! There is no urgency with this one. 🍵 |
5595d80
to
997cd5b
Compare
Hey @hjoelr, can I help you with adding the missing tests? 🙂 |
@bennycode Um, good question 😊. I recently brought my branch back into sync with your version and was planning on figuring out how to do this. I just need to take the time to learn how to mock in Jasmine. I hope to eventually submit some additional PRs and need to learn how to do this. I wouldn't mind help, but I also don't want you to have to spend time to write tests I should be writing 🙄. |
Codecov Report
@@ Coverage Diff @@
## main #606 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 19 19
Lines 509 530 +21
Branches 39 39
=========================================
+ Hits 509 530 +21
Flags with carried forward coverage won't be shown. Click here to find out more.
|
3b35fcc
to
af26f6a
Compare
@bennycode I think this PR is ready for review and merge. Thanks for bearing with me on this one! |
The Coinbase API supports some additional websocket types. I'm adding them so they can be used natively in TypeScript.