Repository navigation
Refactor to decouple tests - #11812
sleepwithcoffee wants to merge 1 commit into
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #11812 +/- ##
==========================================
+ Coverage 86.56% 86.60% +0.04%
==========================================
Files 314 314
Lines 13128 13161 +33
==========================================
+ Hits 11364 11398 +34
+ Misses 1764 1763 -1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
@sleepwithcoffee thanks for taking care of that.
Still to ensure best reliability all tests refactor should be done in a way so new tests run with runServerless util. See https://github.com/serverless/serverless/tree/main/test#unit-tests
And as I checked in more detail we can totally remove the validate.test.js file as:
- Som tests confirm implementation details (we should not write such tests, and we're ok to remove them
- Stage resolution is already well tested here:
serverless/test/unit/lib/plugins/aws/provider.test.js
Lines 760 to 795 in 16dd286
- Region resolution is already tested here:
serverless/test/unit/lib/plugins/aws/provider.test.js
Lines 591 to 626 in 16dd286
In light of that, I've just removed this test file from the repository: 2e004eb
So, sorry you've taken an effort on that, but at least it moved us into right direction of removing this test file :)
|
sure @medikoo let me look further into this since I am also not confident about this approach. Let me look around and think a bit more if we are ok to remove these tests, or can modify them in a meaningful way given we already have similar tests in other places. |
Addresses: #2582
Refactor tests used in #11796
awsPlugin.options.stageandawsPlugin.provider.getStage()