Skip to content
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

Merged
merged 4 commits into from
Apr 1, 2024
Merged

Prep for major release of rtm-api #1764

merged 4 commits into from
Apr 1, 2024

Conversation

filmaj
Copy link
Contributor

@filmaj filmaj commented Mar 28, 2024

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 a 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. I 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 😄

@filmaj filmaj added semver:major pkg:rtm-api applies to `@slack/rtm-api` labels Mar 28, 2024
@filmaj filmaj requested a review from a team March 28, 2024 17:44
@filmaj filmaj self-assigned this Mar 28, 2024
Copy link
Contributor

@hello-ashleyintech hello-ashleyintech left a 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?

@filmaj
Copy link
Contributor Author

filmaj commented Mar 28, 2024

@hello-ashleyintech I added the tests here!

Copy link
Contributor

@hello-ashleyintech hello-ashleyintech left a 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', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! 🙌

Copy link
Member

@zimeg zimeg left a 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 💪

Comment on lines +80 to +83
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();
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweeeeet

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks!

@filmaj filmaj merged commit 6a3d21c into main Apr 1, 2024
17 checks passed
@filmaj filmaj deleted the rtm-major-version branch April 1, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:rtm-api applies to `@slack/rtm-api` semver:major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants