You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test : add unit tests for upstash-rest.ts getUpstashConfig #3031
Summary of What Needs to be Done: Add unit tests for src/lib/upstash-rest.ts, specifically the getUpstashConfig() function. This is the only pure function in the module — all other functions make network calls to the Upstash API and require mocking fetch.
Changes that Need to be Made:
Create test/upstash-rest.test.ts with Vitest
Test getUpstashConfig: when UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN are both set in env, verify it returns { url, token }; when either is missing, verify it returns null; when either is empty string, verify it returns null
Impact that it would Provide: getUpstashConfig is the configuration gate for the entire Upstash integration. Tests prevent regression when env var names change or when the null-guard logic is accidentally modified. The test is fast and requires no network mocking.
Activity
aaniya22 commentedon Jul 12, 2026
pls assign this to me under gssoc
github-actions commentedon Jul 12, 2026
Assigned to @aaniya22! You have 7 days to open a PR. No PR after 7 days = auto-unassigned so others can pick it up. Good luck!