fix: fixes language comparing in react-native sdk#67
Conversation
|
Walkthrough
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/react-native/src/lib/common/tests/utils.test.ts`:
- Around line 457-465: The test in getLanguageCode is not proving
case-insensitive matching because it uses the same casing for input and expected
output. Update the region-tagged canonical code case in the utils.test.ts suite
so getLanguageCode is called with a differently cased value like "de-de" while
still expecting the canonical result "de-DE", keeping the existing survey
fixture and assertion structure intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1409f47e-9899-4998-b43f-52c8acee91a6
📒 Files selected for processing (2)
packages/react-native/src/lib/common/tests/utils.test.tspackages/react-native/src/lib/common/utils.ts



Fixes language comparing in the sdk, now both survey.language.code and the stored language.code are lowercased first