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

Auth.js backend testing #133

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Conversation

FernFinder
Copy link
Contributor

Overview

  • This pull request increases coverage of the backend auth.js file to 100%.

Related Issue(s)

Added

  • New file backend/tests/auth.test.js has unit tests for the entire auth.js file.

Changes

  • backend/middleware/auth.js has been slightly modified so that the 401 errors are more specific.

Screenshots

image

Instructions for Testing

  • Run npm run coverage on backend.

Checklist before Merging

  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate).
  • I have ensured the changes adhere to the project's coding standards and guidelines.

@FernFinder FernFinder changed the title Auth.js Unit Testing Auth.js backend testing Apr 23, 2024
Copy link
Contributor

@dusek2 dusek2 left a comment

Choose a reason for hiding this comment

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

Pull Request Review for "Auth.js backend testing #133":

  • Readability:
    Clear organization and meaningful error messages enhance understanding.

  • Code Quality:
    Refinements to error handling increase specificity; well-crafted test suite.

  • Testing:
    Comprehensive unit tests now ensure 100% coverage of authentication logic.

  • Functionality:
    Specific error messages improve user feedback and debugging capability.

  • Housekeeping:
    All modified files are relevant to the goal, and coding standards are maintained.

Additional Comments:

Great work on achieving full coverage!

We might want to create API document

Copy link
Contributor

@Alexmc567 Alexmc567 left a comment

Choose a reason for hiding this comment

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

Pull Request Review:

  • Readability: Great description and well documented.

  • Code Quality: Code appears to be of high quality and is consistent with the project.

  • Testing: Testing instructions provided. Tests do increase coverage.

  • Functionality: Adds tests that appear to function correctly.

  • Housekeeping: No junk files, & lots of comments. No use of AI mentioned. Overall great contribution!

@FernFinder FernFinder merged commit 6d88797 into UNLV-CS472-672:main Apr 23, 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