Open jullia02 opened 2 months ago
Totals | |
---|---|
Change from base Build 10607818019: | 0.0% |
Covered Lines: | 22323 |
Relevant Lines: | 25582 |
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
This PR refactors the
saveSettings()
function in settings.js, reducing cognitive complexity from 17 to 15 to improve readability and for simplicity. This was done by making multiple helper functionshandleNewSettings()
,processNewSettings()
, andcheckAndUpdateConfig()
.This PR resolves #570, with the sonar cloud warning: https://sonarcloud.io/project/issues?open=AZFmi_ySybYwxy-_uEQC&id=CMU-313_NodeBB
This refactored code is covered by the test file: ./test/public/src/settings.js
UI Test Instructions