test(web-api): use channel_id instead of channels with files upload v2#2197
test(web-api): use channel_id instead of channels with files upload v2#2197
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #2197 +/- ##
=======================================
Coverage 91.99% 91.99%
=======================================
Files 38 38
Lines 10386 10386
Branches 657 657
=======================================
Hits 9555 9555
Misses 819 819
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
🤔 Super glad this was suggested to be in another PR by @WilliamBergamin! I'm now wondering if one test should keep "channels" until the next breaking release to avoid possible regressions in related changes? For quick reference, here's the warning output:
|
WilliamBergamin
left a comment
There was a problem hiding this comment.
This seems good 💯 removing the warning from the tests output is nice!
Maybe we could add a unit tests that ensure the warning is printed if channels is used instead of channel_id, but not a blocker
|
@WilliamBergamin Thanks so much for reviewing! I was looking into adding a regression test here, but found the exact case covered already- 🎉 node-slack-sdk/packages/web-api/src/file-upload.spec.ts Lines 84 to 92 in 9210a1c I'll update this branch before merging, but am feeling good about these testing changes! |
Summary
This PR replaces
channelswithchannel_idin tests testing thefilesUploadV2method to avoid warnings in test output 👾Preview
Before changes: https://github.com/slackapi/node-slack-sdk/actions/runs/13958988507/job/39077186721#step:9:239
After changes:
Requirements