test(server): expand app.ts coverage and restructure for readability#967
Merged
test(server): expand app.ts coverage and restructure for readability#967
Conversation
- Add GET / root path test (GitHub project URL) - Add body size limit exceeded test (413 REQUEST_TOO_LONG) - Add owner with empty repositories test (BAD_REQUEST) - Add repositories count exceeds max test (BAD_REQUEST) - Add unknown top-level field test (BAD_REQUEST) - Add explicit owner field test (OK) - Add multiple repositories test (OK) - Add token_hash response field test (OK) - Add legacy scope=owner with empty repos test (OK) - Add legacy scope=owner with non-empty repos test (OK) - Rename describes: UNAUTHORIZED->authentication, BAD REQUEST->request body validation, FORBIDDEN->access control, OK->successful token creation - Add sub-describes for body format, permissions, repositories, owner - Add legacy request body support sub-describe Co-authored-by: qoomon <3963394+qoomon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add more tests for app.ts with improved structure
feat(tests): expand app.ts coverage and restructure for readability
Mar 19, 2026
qoomon
approved these changes
Mar 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Expands and reorganizes app.test.ts to improve coverage and readability of the server’s Hono app routes, especially around /access_tokens validation and success/legacy request flows.
Changes:
- Adds a new test for
GET /returning the project URL. - Restructures
/access_tokenstests into intent-based describe blocks (authentication, request body validation, access control, successful token creation). - Adds new coverage for body-size limiting, stricter request validation scenarios, token hashing in responses, and legacy request-body support.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Owner
|
@copilot apply changes based on the comments in this thread |
…chars, ==) Co-authored-by: qoomon <3963394+qoomon@users.noreply.github.com>
Contributor
Author
Done in 2c06dc3. Hono's |
qoomon
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GET /root path testscope=ownerwith empty repos → ALLscope=ownerwith non-empty repos💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.