test: add GitHub REST utils and respec size handler tests#500
test: add GitHub REST utils and respec size handler tests#500marcoscaceres wants to merge 4 commits intomainfrom
Conversation
4befb8e to
cbbfbc7
Compare
There was a problem hiding this comment.
Pull request overview
Adds/expands Jasmine coverage for GitHub REST pagination/SSRF validation and the routes/respec/size handlers, to improve regression protection around URL safety, pagination behavior, and size-report persistence/deduplication.
Changes:
- Adds a new test suite for
routes/respec/sizecovering auth, input validation, file writes, truncation, dedup buffer behavior, and GET headers/body. - Expands
github/lib/utils/resttests with additional cases for endpoint validation, pagination link handling, page limits, request headers, and HTTP errors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| tests/routes/respec/size.test.js | New tests for Respec size GET/PUT handlers including env setup, file persistence, and dedup buffer behavior. |
| tests/routes/github/lib/utils/rest.test.js | Expanded tests for GitHub REST request generator covering SSRF guard, pagination, error handling, and request headers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cbbfbc7 to
f5981a8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 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 2 out of 2 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.
f5981a8 to
d0d4ac3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 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 2 out of 2 changed files in this pull request and generated 3 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 2 out of 2 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot Please address and fix any outstanding commo |
Fixed in ccffa9a. The last outstanding issue was the page-limit test silently triggering |
|
@copilot Can you review this and fix any issues that come up? |
|
@copilot Can you confirm all your feedback has been addressed? Please resolve the threads that have been addressed and fix anything outstanding. |
All feedback has been addressed. The final cleanup in 89e5652 removes the duplicate
Reviewed — found and fixed a leftover issue in |
| process.env.DATA_DIR = DATA_DIR; | ||
| process.env.RESPEC_GH_ACTION_SECRET = TEST_SECRET; |
There was a problem hiding this comment.
How about we use jasmine helpers and set all fake variables there?
There was a problem hiding this comment.
Then we won't need dynamic imports etc. likely.
Summary