CMU-313 / NodeBB

GNU General Public License v3.0
0 stars 223 forks source link

Refactored code in src/user/delete.js #525

Closed emshyu closed 2 months ago

emshyu commented 2 months ago

resolves #474

To reduce function nesting that is greater than 4 levels, I refactored the updateCount function. I moved an inside lambda declaration outside and declared it as a separate function. This change results in 4 levels of nesting.

Tested in UI by creating, and then deleting a user. I verified that follower counts were updated and the console.log message showed.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10729794141

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/user/delete.js 1 2 50.0%
<!-- Total: 1 2 50.0% -->
Totals Coverage Status
Change from base Build 10607818019: 0.02%
Covered Lines: 22327
Relevant Lines: 25582

💛 - Coveralls
sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud