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

Refactoring code in src/middleware/render.js to Reduce Cognitive Complexity from 16 to 15 #489

Open
wants to merge 25 commits into
base: f24
Choose a base branch
from

Commits on Sep 1, 2024

  1. Configuration menu
    Copy the full SHA
    7c97cbb View commit details
    Browse the repository at this point in the history
  2. changed the duplicate res.headersSent conditions in lines 60 and line…

    …s 71 with the checkHeadersSent(res) helper method to reduce cognitive complexity
    vickyc2266 committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    2496fae View commit details
    Browse the repository at this point in the history
  3. placement of comments for new helpder function checkHeadersSent added…

    … for visibility of coder
    vickyc2266 committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    1ba5d02 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Configuration menu
    Copy the full SHA
    d561aac View commit details
    Browse the repository at this point in the history
  2. added test cases in middleware.js in test folder to attempt testing n…

    …ew code or checkHeadersSent function
    vickyc2266 committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    d50fec0 View commit details
    Browse the repository at this point in the history
  3. successfully ran new test case (with comments of what the test case d…

    …oes) and saw that the coverage displayed increased coverage in lines and function compared to previously
    vickyc2266 committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    04ac3ff View commit details
    Browse the repository at this point in the history
  4. tried to add console.log(VICKY_CHEN) and run server but it failed and…

    … gave error saying VICKY_CHEN Not defined
    vickyc2266 committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    868f0c6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ef953d6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2964a48 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3ac30e2 View commit details
    Browse the repository at this point in the history
  8. new styling

    vickyc2266 committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    8657b49 View commit details
    Browse the repository at this point in the history
  9. fixing comment styling

    vickyc2266 committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    8c56d17 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5c2499e View commit details
    Browse the repository at this point in the history
  11. changed the checkHeadersSent function to be the exact duplicate of th…

    …e original code just to see if it'll work and pass test cases now
    vickyc2266 committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    5a44a9d View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    67290cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11432b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8d7b296 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    73b5f60 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8ad0769 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7193437 View commit details
    Browse the repository at this point in the history
  7. fixing lint error

    vickyc2266 committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    f5a5d1b View commit details
    Browse the repository at this point in the history
  8. fixing lint issue

    vickyc2266 committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    c03e144 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a13b956 View commit details
    Browse the repository at this point in the history
  10. trying to edit test cases

    vickyc2266 committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    9e04ff9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0f2c161 View commit details
    Browse the repository at this point in the history