test: improve test core feature test coverage#1589
Conversation
There was a problem hiding this comment.
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.jsto cover many user controller flows (login, signup, 2FA, unlinking, password reset, etc.). - Expanded
test/passport.test.jsto coverisAuthenticated, (de)serialization, and LocalStrategy behavior. - Removed
test/auth.opt.test.jsand updatedtest/TESTING.mdto 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.
d9f5f7e to
e39307b
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Checklist
--no-verifywas not used for the commit(s)npm run lintpassed locally without any errorsnpm testpassed locally without any errorsnpm run test:e2e:replaypassed locally without any errorsnpm run test:e2e:custom -- --project=chromium-nokey-livepassed locally without any errorsDescription
Screenshots of UI changes (browser) and logs/test results (console, terminal, shell, cmd)