Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying Emma's refactoring code changes from Project 1 #23

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

etong11
Copy link

@etong11 etong11 commented Sep 17, 2024

Copying Project 1 code from https://github.com/etong11/NodeBB

Refactoring helpers.formatApiResponse in src/controllers/helpers.js to reduce its Cognitive Complexity from 20 to the 15 allowed. This was done by replacing the nested switch and if statements with function calls.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10909974829

Details

  • 32 of 38 (84.21%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 82.676%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/controllers/helpers.js 32 38 84.21%
Totals Coverage Status
Change from base Build 10839551210: 0.005%
Covered Lines: 22335
Relevant Lines: 25594

💛 - Coveralls

@ldlin1 ldlin1 merged commit bfba324 into f24 Sep 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants