🧪 Add testing for buildScorecardUrl - #63
Conversation
Added comprehensive unit testing for `buildScorecardUrl` in `scorecard.ts` using `node:test` as per the codebase convention. Includes scenarios for normal parsing, API key appending, absent API keys, and nested key settings. Used `Module._load` intercept pattern for resolving specific native type stripping blockages caused by deep `expo-modules-core` imports when executing `.cjs` testing wraps on React Native services via Node.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: The testing gap addressed was that
buildScorecardUrlinsidesource/services/colleges/scorecard.tshad no unit tests.📊 Coverage: What scenarios are now tested include appending the API key when present, omitting it when absent or invalid, properly constructing URLs with trailing slashes, and correctly appending
keys_nested=truequery parameters.✨ Result: Increased code test coverage and confidence when refactoring scorecard fetching logic.
PR created automatically by Jules for task 4061066768353959369 started by @MarsLuay