-
Notifications
You must be signed in to change notification settings - Fork 662
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
Prep for major release of rtm-api #1764
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.
LGTM! If tests were attempted to be added, would they be in this PR or a follow-up PR?
breaking change update)
…transition back to disconnected. also add basic integration tests.
@hello-ashleyintech I added the tests here! |
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.
💯 great work with the testing! 🙌
// Socket mode client pointing to the above two posers | ||
let client = null; | ||
|
||
describe('Integration tests with a WebSocket server', () => { |
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.
nice! 🙌
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.
el classico lives on 💪
it('should not raise an exception if calling disconnect() when already disconnected', async () => { | ||
// https://github.com/slackapi/node-slack-sdk/issues/842 | ||
await client.disconnect(); | ||
}); |
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.
Sweeeeet
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.
LGTM; thanks!
Mainly updating dependencies and dropping support for node below 18.
BUT! I am worried that this package has no tests. Esp. since I updated to the latest major of
websockets
which has some breaking changes.Can I manually test an RTM app these days? I have no idea. EDIT: YES it's possible! I tested a RTM app w/ the old package prior to this change, works fine. Also tested it with the changes in this PR, also works OK!
Another thought: maybe I copy the basic web socket server integration test suite I added to the socket mode package into here (or factor the server out into aI did this! This package now includes basic integration tests. I was able to even add a test to confirm #842 is an issue and added a fix that passes the test 😄utils/
dir or something in this repo and re-use it in both packages?). Then I could at least add some smoke test-style integration tests? That should in theory also be able to write a test for #842 and thus feel confident about a fix.