-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add Singular links e2e test #2658
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughA new test case was introduced to the link redirects test suite, specifically targeting the Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/web/tests/redirects/index.test.ts (1)
106-115: Well-structured test following established patterns.The test implementation is solid and consistent with the existing redirect tests. The assertions properly validate the Singular tracking functionality.
Consider these potential improvements for robustness:
- The regex pattern
[a-zA-Z0-9]+might be too restrictive if query parameter values contain URL-encoded characters or special characters- Consider testing the actual redirect destination URL structure if applicable
If query parameter values might contain URL-encoded characters, consider updating the regex patterns:
- expect(response.headers.get("location")).toMatch(/cl=[a-zA-Z0-9]+/); - expect(response.headers.get("location")).toMatch(/ua=[a-zA-Z0-9]+/); - expect(response.headers.get("location")).toMatch(/ip=[a-zA-Z0-9]+/); + expect(response.headers.get("location")).toMatch(/cl=[a-zA-Z0-9%._-]+/); + expect(response.headers.get("location")).toMatch(/ua=[a-zA-Z0-9%._-]+/); + expect(response.headers.get("location")).toMatch(/ip=[a-zA-Z0-9%._-]+/);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/tests/redirects/index.test.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
apps/web/tests/redirects/index.test.ts (2)
Learnt from: devkiran
PR: dubinc/dub#2637
File: apps/web/app/(ee)/api/singular/webhook/route.ts:0-0
Timestamp: 2025-07-17T06:41:45.598Z
Learning: In the Singular integration (apps/web/app/(ee)/api/singular/webhook/route.ts), the event names in the singularToDubEvent object have intentionally different casing: "Copy GAID" and "copy IDFA". This casing difference is valid and should not be changed, as these are the correct event names expected from Singular.
Learnt from: devkiran
PR: dubinc/dub#2177
File: apps/web/lib/api/links/bulk-create-links.ts:66-84
Timestamp: 2025-06-06T07:59:03.120Z
Learning: In apps/web/lib/api/links/bulk-create-links.ts, the team accepts the risk of potential undefined results from links.find() operations when building invalidLinks arrays, because existing links are fetched from the database based on the input links, so matches are expected to always exist.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
Summary by CodeRabbit