-
Notifications
You must be signed in to change notification settings - Fork 1
Add unicode character test coverage #80
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
Conversation
Co-authored-by: hckhanh <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 191 191
Branches 63 63
=========================================
Hits 191 191 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot add test with Vietnamese samples |
CodSpeed Performance ReportMerging #80 will not alter performanceComparing Summary
Footnotes
|
There was a problem hiding this 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 adds comprehensive test coverage for unicode character handling across the library's URL-building functions. The implementation uses codePointAt for unicode-aware encoding in query strings, while path parameters use the standard encodeURIComponent function.
- Added 15 new test cases validating unicode encoding (emoji, accents, CJK characters, symbols)
- Tests cover path parameters, query parameters, and template substitution
- All tests verify correct UTF-8 percent-encoding (e.g.,
🚀→%F0%9F%9A%80)
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/urlcat.test.ts | Adds 6 tests for createUrl validating unicode in path parameters, query parameters, and combined scenarios |
| test/subst.test.ts | Adds 4 tests for subst validating unicode in template parameter substitution |
| test/query.test.ts | Adds 5 tests for query validating unicode in both keys and values of query strings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: hckhanh <[email protected]>
|
Added 7 Vietnamese character tests covering:
Tests validate proper encoding of Vietnamese diacritics (â, ă, đ, ê, ô, ơ, ư) and tone marks in path parameters, query strings, and template substitution. Commit: 264c2ef |



Add tests for unicode character handling
This PR adds comprehensive tests to validate unicode character handling (e.g.,
🚀) in the fast-url library.Tasks:
codePointAtin querystring)createUrlfunction (path and query params) - 6 testsqueryfunction - 5 testssubstfunction - 4 testsSummary:
Added 22 new tests covering:
Vietnamese Test Coverage:
createUrl function (3 tests):
query function (2 tests):
subst function (2 tests):
All tests validate proper URL encoding of unicode characters using the existing
encodeURIComponentandcodePointAtimplementation.Security Summary:
CodeQL security scan completed with 0 alerts. No security vulnerabilities detected.
Original prompt
💡 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.