Closed ldlin1 closed 2 months ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Totals | |
---|---|
Change from base Build 10607818019: | -0.001% |
Covered Lines: | 22328 |
Relevant Lines: | 25587 |
There is one line in the code I added (line 84) that isn't covered by the tests, but the equivalent line in the original code (line 80) also isn't covered by the tests. The decrease in test coverage can most likely be attributed to the increased amount of code in the file due to my additions.
Refactored the function
addEventStartEnd
insrc/topics/posts.js
to reduce its cognitive complexity from 23 to the 15 allowed. This was done through the creation and use of the helper functionsprocessPost
,processLastPost
,setEventStartEnd
, andgetNextPost
The refactored code passed the linter and test suite when run. Changes were also tested manually with console logs when interacting with the UI.
This pull request resolves #379