Skip to content

test: improve test core feature test coverage#1589

Merged
YasharF merged 2 commits intosahat:masterfrom
YasharF:coretests
Mar 25, 2026
Merged

test: improve test core feature test coverage#1589
YasharF merged 2 commits intosahat:masterfrom
YasharF:coretests

Conversation

@YasharF
Copy link
Copy Markdown
Collaborator

@YasharF YasharF commented Mar 24, 2026

Checklist

  • I acknowledge that submissions that include copy-paste of AI-generated content taken at face value (PR text, code, commit message, documentation, etc.) most likely have errors and hence will be rejected entirely and marked as spam or invalid
  • I manually tested the change with a running instance, DB, and valid API keys where applicable
  • Added/updated tests if the existing tests do not cover this change
  • README or other relevant docs are updated
  • --no-verify was not used for the commit(s)
  • npm run lint passed locally without any errors
  • npm test passed locally without any errors
  • npm run test:e2e:replay passed locally without any errors
  • npm run test:e2e:custom -- --project=chromium-nokey-live passed locally without any errors
  • PR diff does not include unrelated changes
  • PR title follows Conventional Commits — https://www.conventionalcommits.org/en

Description

  • Added unit tests for better coverage of core functions in controllers/user.js and config/passport.js
  • Removed redundant test file test/auth.opt.test.js

Screenshots of UI changes (browser) and logs/test results (console, terminal, shell, cmd)

Copilot AI review requested due to automatic review settings March 24, 2026 23:29
Copy link
Copy Markdown

Copilot AI 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 overview

This PR increases unit test coverage for core authentication and user-account flows, focusing on controllers/user.js and config/passport.js, and removes a redundant OAuth test file.

Changes:

  • Expanded test/user.test.js to cover many user controller flows (login, signup, 2FA, unlinking, password reset, etc.).
  • Expanded test/passport.test.js to cover isAuthenticated, (de)serialization, and LocalStrategy behavior.
  • Removed test/auth.opt.test.js and updated test/TESTING.md to reflect the current test suite layout.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
test/user.test.js Adds extensive controller unit tests, including require-shim-based dependency stubbing.
test/passport.test.js Adds middleware and strategy unit tests for config/passport.js.
test/auth.opt.test.js Deletes a redundant OAuth token-saving test suite.
test/TESTING.md Updates test tree documentation to match current test files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YasharF YasharF force-pushed the coretests branch 2 times, most recently from d9f5f7e to e39307b Compare March 24, 2026 23:54
@YasharF YasharF requested a review from Copilot March 25, 2026 01:00
Copy link
Copy Markdown

Copilot AI 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 overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI 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 overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YasharF YasharF merged commit cb9005d into sahat:master Mar 25, 2026
6 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.

3 participants