Skip to content

Conversation

shark121
Copy link
Contributor

This request addresses two key improvements:

  1. Added Test Coverage for getCookie:

    • Added comprehensive test cases to the getCookie function in lib/utils/user.js.
    • These tests cover two main scenarios:
      • Handling non-existent cookies.
      • Verifying the basic functionality of the function
  2. Improved Code Clarity in lib/utils/user.js:

    • Added comments and more descriptive variable names.

@CLAassistant
Copy link

CLAassistant commented Mar 24, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add jsdom to the dev dependencies and get rid of white space only lines.

@coveralls
Copy link

coveralls commented Mar 24, 2025

Coverage Status

coverage: 16.113% (+0.6%) from 15.519%
when pulling add8951 on shark121:main
into c13b9b7 on OneBusAway:main.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, although I'm confused by the seemingly unrelated changes in the .env.example file. Can you explain why you made those changes? Also, linting is failing.

.env.example Outdated


PUBLIC_NAV_BAR_LINKS={"Home": "/","About": "/about","Contact": "/contact","Fares & Tolls": "/fares-and-tolls"}
PUBLIC_NAV_BAR_LINKS='{"Home": "/","About": "/about","Contact": "/contact","Fares & Tolls": "/fares-and-tolls"}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what prompted this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah well the change is not very related to what I was doing mainly but the syntax of the value of the variable seemed to be incorrect. The variable attempted to directly store a dictionary which i thought was not standard practice. If this change was not ideal however please advise me on how to go about it next time.
Thank You.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please undo this change.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert the changes to .env.example please

.env.example Outdated


PUBLIC_NAV_BAR_LINKS={"Home": "/","About": "/about","Contact": "/contact","Fares & Tolls": "/fares-and-tolls"}
PUBLIC_NAV_BAR_LINKS='{"Home": "/","About": "/about","Contact": "/contact","Fares & Tolls": "/fares-and-tolls"}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please undo this change.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 but please review my feedback for future changes.

PUBLIC_ANALYTICS_DOMAIN=""
PUBLIC_ANALYTICS_ENABLED=true
PUBLIC_ANALYTICS_API_HOS=""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, please be sure to avoid including extra whitespace like this in a file that you've reverted your other changes in.

@aaronbrethorst aaronbrethorst merged commit ed20c13 into OneBusAway:main Mar 27, 2025
4 checks 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.

4 participants